Expand my Community achievements bar.

SOLVED

Profile Script solution for dual reporting suites (tracking engagement on one and orders on another)

Avatar

Level 4

Hi all,  We are currently operating with two different websites (homepage where we are running tests on one and resulting orders on another).

 

I was provided a solution by Adobe to run my experiment as normal with the engagement metrics being measured (in one reporting suite) and to setup another XT using a profile script that looks for anyone who qualifies for my initial AB and track their orders associated with it (in the other reporting suite). 

 

This solution worked but didn't separate the Control vs Experience orders - it just gave me one value of orders for the activity as a whole - not useful when trying to determine uplift against the control!

 

I need to amend the profile script to also look for the attribute 'experience.name' or 'experience.id' - this is the original script just looking for the activity qualification:

//retrieves all the activity IDs on the current page
var arrAct= user.activeActivities;

// Define the Activity ID to search for example
var numberToSearch = 123456;

// Search for the Activity ID in the array
var numberIndex = arrAct.indexOf(numberToSearch);

// Check if the Activity ID is found
if (numberIndex !== -1) {
// Activity ID found
return 123456;
} else {
// Activity ID not found
return false;
}

 

Can someone please help me figure out how i update this?  I am using at.js and making the changes in the VEC.  I saw a post in here about using response tokens to capture this info. I have configured the attributes in the response token and i can see them firing in the console but i don't know if the script above is referencing the tokens or how to update it to include the additional attributes.

 

Please advise!

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

One simple way to do this would be to add a short custom code script to each experience in VEC.
For example, in Control:

<script>
adobe.target.getOffers({
  request: {
    execute: {
      mboxes: [       
        {
          index: 0,
          name: "activity-data",
          profileParameters: {
            "activityDetails": "My Activity:Control"
          }
        }
      ]
    }
  }
});
</script>

 And then for the Variant you can update "activityDetails" to "My Activity Name:Experience B", for example. 

This would mean you wouldn't need the profile script, as the value you pass in the getOffers call is automatically tied to the profile  

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

One simple way to do this would be to add a short custom code script to each experience in VEC.
For example, in Control:

<script>
adobe.target.getOffers({
  request: {
    execute: {
      mboxes: [       
        {
          index: 0,
          name: "activity-data",
          profileParameters: {
            "activityDetails": "My Activity:Control"
          }
        }
      ]
    }
  }
});
</script>

 And then for the Variant you can update "activityDetails" to "My Activity Name:Experience B", for example. 

This would mean you wouldn't need the profile script, as the value you pass in the getOffers call is automatically tied to the profile  

Avatar

Level 4

Oh this is awesome, thank you @alexbishop 

 

I've added it as a custom code snippet to the control and the experience (see experience below) in the AB test where i made the content changes, I'm tracking engagement with the elements changed (link clicks) in this AB. 

 

Mycal_Tamariki_1-1694043221258.png

I then setup an XT targeting the same url and i created an audience using the profile parameter passed in the other activity - and on this activity i setup the goal to measure orders in my other reporting suite:

Mycal_Tamariki_2-1694043394786.png

Does this look about right?  Just want to make sure i've got the setup correct.  I've tested it but my analytics isn't showing anything yet so i'm not sure if it's a report delay or if i've done it incorrectly...

 

Thanks!

 

 

Mycal

 

 

 

Avatar

Employee Advisor

That does look correct to me, did you see the data in analytics?