Expand my Community achievements bar.

SOLVED

Mutually Exclusive Return Vsistor

Avatar

Level 3

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. 

ParitMittalameliaw95025277ameliaw95025277

1 Accepted Solution

Avatar

Correct answer by
Level 3

ryanr8

This approach worked !!!

Thanks a lot

View solution in original post

4 Replies

Avatar

Employee Advisor

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.

  1. For new visitors (we have an out-of-the-box profile for new visitors so don't have to write a profile script for this--just use 'new visitor' under the 'visitor profile' in the Audience creation drop down list). This activity has only one experience, Experience A.
  2. For returning visitors (could also use our out-of-the-box profile for return visitors) they qualify for a AB test (Experience B and C). Target will automatically mutually exclude the visitors between the 2 experiences in an AB test. So you should not need a profile script to assign random groups.

Let me know if I've missed the boat completely though.

Avatar

Level 3

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

Avatar

Employee Advisor

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:

1342243_pastedImage_14.png

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.

Avatar

Correct answer by
Level 3

ryanr8

This approach worked !!!

Thanks a lot