Expand my Community achievements bar.

Overriding mbox3rdPartyId using AT profile scripts.

Avatar

Level 3

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.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

7 Replies

Avatar

Community Advisor

@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

Avatar

Level 3

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.

Avatar

Community Advisor

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

 

 

Avatar

Level 3

Thanks for your patience & resolution steps @Rajneesh_Gautam_ 

Does that mean that I should target the A/B test for only first-time visitors and use the XT activity for returning visitors?

Wouldn't that skew the results as the audience is getting divided between 2 different activities? 

My goal is to serve the A/B test to all visitors (auth & unauth visitors) and not just first-time (un-auth) visitors.

Is there a way we could do this without creating a separate XT activity and instead by a custom audience similar to the one you previously mentioned just for the A/B test though.

 

Avatar

Community Advisor

hi @hs_vk - for reporting purposes, I would suggest you checking how the proposed solution works when you use Analytics For Target (as thats based on ECID instead and should not be impacted with mbox3rdpartyid overwrite).

 

The custom audience will not work for the same AB test as for the scenario when a visitor is returning back (after browsing authenticated sections), Target will treat the visitor as a new visitor and assign the experiences randomly. The only way will be to use an XT in that case. 

Avatar

Level 3

Thanks @Rajneesh_Gautam_ 

Your given solution would definitely work for an XT activity however I am looking for a solution for an A/B test.

I wonder if implementing the below logic to build an audience through profile scripts would work-

 

  1. For every visitor- fetch the session id & the experience id for the experience that the visitor might have seen and save it
  2. For every new visitor, check if they have seen the experience before 
  3. If yes, check if the current session id is the same as the session id during which the previous experience was seen.
  4. If thats true, then serve the same experience to the user
  5. If no, randomly assign an experience within the activity to the user.

I'm not sure if some logic like the above can be used in the profile scripts to create an audience for all visitors but serving them an experience based on the defined logic.

 

Avatar

Administrator

Thanks for posting your question @hs_vk! And thanks  for your always-helpful guidance here on the thread! @hs_vk please feel free to update this thread if you found your answer and/or if you were satisfied with the direction that @Rajneesh_Gautam_ provided (by clicking on the "Correct Reply" button at the top left of the most helpful reply). 

 

Otherwise, do any of our fellow Adobe Target Community Advisors and/ or Adobe Target Community Mentors might be able to weigh in and help clarify @hs_vk 's question further? 

CC our other brilliant Adobe Target Community Advisors: @PratheepArunRaj, and 

And our other inspiring Adobe Target Community Mentors: 

@abhilashsape@Gokul_Agiwal@Rajneesh_Gautam_@PratheepArunRaj, and @Sneha-Parmar