Hi,
I am working on re-targeting campaign.
New Visitor to the campaign X : Will see Experience A
Return Visitor to the campaign X : Will see Experience B or C
I am facing challenge with making making B & C mutually exclusive..
Profile script codes are as follows any help would be appreciated:
To identify if the user is new or returning:
if (page.url == "XY"){
if(user.isFirstSession){
return true;
}
else{
return false;
}
To make Experience B and C Mutually exclusive :
if (!user.get('HomePageReturnprofileTest') == true) {
var ran_number=Math.floor(Math.random() *99);
if (ran_number <= 49) {
return 'GroupB';
} else {
return 'GroupC';
}
}
It only seems to be working for two experience i.e new v/s returning visitor. As soon as i add third experience to the XT campaign. The campaign stops working.
ParitMittal ameliaw95025277ameliaw95025277
Solved! Go to Solution.
Hi YogitaBist,
If I'm following you correctly, you may not need a profile script for this. It looks like you want to test Experience B against Experince C for return visitors. And if they are a new visitor show only Experience A . I'd maybe treat this as 2 activities.
Let me know if I've missed the boat completely though.
Views
Replies
Total Likes
ryanr8 yes you got it, absolutely right
Though !
#1 When i created An activity in target for Experience B & C [using out-of-the-box profile for return visitors], it didn't work.
I have been trying doing the above activity using XT campaign
Because
1) New and returning visitor need to be part of the same activity [Reason #1 didn't work]
2) A/B set up does not gives the option of having two different audiences for recipes in a single activity but XT campaign does
I have not been able to randomize Experience B and Experience C in an XT campaign..
Is there any option to do the above using an XT campaign ?
XT campaign set up
New Visitor : Experience A
Return Visitor : Experience B or C
Views
Replies
Total Likes
Okay, if you need both new and return visitors under the same activity for some reason you can use an XT activity to achieve this. Here's how I'd set it up:
1. Create a profile script to randomly assign visitors a number between 1-100 (this will be reusable for future tests too). In my example name it randVisitorNum. Only assign a number to a visitor if it hasn't already been assigned (you don't want the visitor's number to change each page view). Here's what the script should look like:
if (!user.get('randVisitorNum')) {
return String(Math.floor(Math.random()*100+1));
}
2. Then create an audience for people from 1-50 and a second audience for people from 51-100. Like so:
3. Setup your XT activity. With a the "new visitor" audience on Exp A. Then use a "combined audience" for Exp B (return visitor + mutually exclusive Audience A (1-50)), and similar for Exp C.
That should get you want you are trying to achieve. Let me know how it works.
Views
Like
Replies
Views
Likes
Replies