Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

KeithF53
Level 2
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
ryanr701
Correct answer by
Employee
Employee

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
ryanr701
Correct answer by
Employee
Employee

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