Overriding mbox3rdPartyId using AT profile scripts. | Community
Skip to main content
Level 3
September 11, 2023
Question

Overriding mbox3rdPartyId using AT profile scripts.

  • September 11, 2023
  • 1 reply
  • 1577 views

Hi,

I am using mbox3rdPartyId whose value is equal to the user login id (1st party id) when a user is logged in and equal to null for a unauthenticated user. I cannot change this setting for now so trying to figure a workaround for this. Basically, when a user first visits the site, I need the experience served to the user before and after login to remain the same.

Current Situation: 

  1. Unknown / unauthorised users - Exp A
  2. Logs in using 1 account - Exp B
  3. Logs out and continues to browse - Exp B
  4. Logs in using second account - Exp C
  5. Logs out and continues to browse - Exp C
  6. Logs back into first account - Exp B

 

Desired Situation:

  1. Unknown / unauthorised users - Exp A
  2. Logs in using 1 account - Exp A
  3. Logs out and continues to browse - Exp A
  4. Logs in using second account - Exp C
  5. Logs out and continues to browse - Exp C
  6. Logs back into first account - Exp A

How can I write a profile script that serves the same experience to a user in the same session, if the visitor has the same ECID & session id, thereby overriding the mbox3rdPartyId just for a specific A/B test that I have set up. Don't want this audience to be applied globally to all activities.

Would appreciate any alternate solutions as well.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Rajneesh_Gautam_
Community Advisor
Community Advisor
September 14, 2023

@hs_vk  - I have been thinking about the potential solution to your challenge. I will not recommend overriding/meddling with mbox3rdpartyid as that will impact other activities - specifically delivering personalisation.

 

I have a potential solution for your consideration:

1. Create a profile script for the Login-dashboard page. So all successfully logged-in customers will have this profile-attribute set.

2. In your AB test, send a unique identifier for the experience delivered using trackEvent() and store it as a profile attribute.

3. Restrict your AB audience to be [Never Logged-in (using profile script from step 1) AND not been part of the AB test (using profile script from step 2)]

4. Create an XT activity on the logged-out page. Add the audiences corresponding to the profile-attributes you built in the Step 2. This will ensure you will show the same experience visitor saw previously. 

 

Let me know your thoughts

 

Regards

Rajneesh

hs_vkAuthor
Level 3
September 18, 2023

Hi @rajneesh_gautam_ 

Thanks for the solution. I've been thinking through how this would work.

In Step 2, did you mean to send a Unique ID like a first party ID or ECID using trackEvent().If not, can you help with an example to show how this works?

 

In step 4, you mentioned an XT activity, however I'm looking to make this audience work for a AB Test or MVT. In that case, would the same audience definition work? Ideally the test should be served to all visitors and not just logged in or logged out user.

The only requirement is to show the same experience to users before they log in & even after they login.

The experience remains consistent once they login & later log out.

But for a first time user who hasn't logged in it will serve a different experience to the user when the user visits the page for the 1st time and once the user logs in and returns to the page it serves a different experience. Showing that a first time unauth user is considered a different user to the same user who logs in 

Hope thats clear. Let me know your thoughts.

Rajneesh_Gautam_
Community Advisor
Community Advisor
September 18, 2023

hi @hs_vk 

  • In step 2, I mean pass an identifier for the experience. For example, if visitor sees Exp A, then you can pass homepagetest_exp_a; in case of visitor sees Exp  then you can pass homepagetest_exp_b and so on. Here's how you can do it (you'll have to add this code in each experience)
    adobe.target.trackEvent({ "mbox": "viewed-exp", "params": { "exp_name": "homepagetest_exp_a" } });​
  • Then create a profile script to capture the value of exp_name
    if (mbox.name == 'viewed-exp' && typeof mbox.param('exp_name') !== undefined){ return mbox.param('exp_name'); }​
  • Now create an audience which checks whether the profile attribute is empty. This will cover the users seeing experience for the first time. Change the audience definition of your AB test.
  • The XT activity is in addition to your AB test and  will have same experiences as your AB test. Its job is to ensure that the same experience is presented even when customers are returning back.

Hope this helps