Expand my Community achievements bar.

SOLVED

Target verified/logged-in users with different experiences on a shared device during same session

Avatar

Level 2

If a machine is shared by multiple users, how can you update a user's audience on log in and then clear it on log out?

 

In our example, we target a banner in our logged in app to an audience A.

A user, who qualifies for audience A, logs in and sees the Target banner in the app.

That user logs out, but does not close the browser window.

 

In the same session, a user, who does not qualify for audience A, logs in and also sees the Target banner in the app.

This is the wrong behavior. 

 

How should I set up targeting so that ONLY users who qualify for an experience because of their log-in information see a Target experience? When the user logs out, that qualification should be forgotten.

 

Thanks,

Keith

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @KeithF53,

Two+ users on a single device and therefore same Target profile can be a little tricky as your noticing. Profile parameters (the stuff under "visitor profile" when setting up audiences) are sticky to the profile and can't be "cleared" like your wondering about. They can be updated/overwritten though. Alternatively, you could target off of mbox parameters (aka custom parameters). These parameters are unique in that they do not persist. They are only used for that request and then are forgotten.

So pass your targeting conditions to Target as custom parameters and use those in your audience definition. For example, if you want to target someone who is 1) logged in, and 2) not subscribed to the newsletter. Pass those to attributes on every applicable request to Target. Using targetPageParams() it might look like this:

targetPageParams = function() { 
  return { 
    "loggedIn": true, 
    "newsletterSubscribed": false
  }; 
};

Then setup the corresponding audience with those "custom parameters".

Since you'll be passing the values of loggedIn and newsletterSubscribed each page-view/SPA-view it wont matter if the device is used by one person or ten people.

Hope that helps!

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

Hi @KeithF53,

Two+ users on a single device and therefore same Target profile can be a little tricky as your noticing. Profile parameters (the stuff under "visitor profile" when setting up audiences) are sticky to the profile and can't be "cleared" like your wondering about. They can be updated/overwritten though. Alternatively, you could target off of mbox parameters (aka custom parameters). These parameters are unique in that they do not persist. They are only used for that request and then are forgotten.

So pass your targeting conditions to Target as custom parameters and use those in your audience definition. For example, if you want to target someone who is 1) logged in, and 2) not subscribed to the newsletter. Pass those to attributes on every applicable request to Target. Using targetPageParams() it might look like this:

targetPageParams = function() { 
  return { 
    "loggedIn": true, 
    "newsletterSubscribed": false
  }; 
};

Then setup the corresponding audience with those "custom parameters".

Since you'll be passing the values of loggedIn and newsletterSubscribed each page-view/SPA-view it wont matter if the device is used by one person or ten people.

Hope that helps!