Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Efficience of profile script vs native functionnality

Tienzen
Level 2
Level 2

Hi!
I have got a case that not allow me to use an AB Test to split audience with 50/50.

 

Exp A (control) > 50%
Group B > 50%
(containing)
  Exp B (visitCount = 1)
  Exp C (visitCount = 2)
  Exp D (visitCount = 3)

 

To make it work, i have configured a XT activity using a profile script to split audience :


if (!user.get('twogroups')) {
var ran_number = Math.floor(Math.random() * 99);
if (ran_number <= 49) {
return 'ExpA';
} else {
return 'GroupB';
}
}

https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/use-profile-scripts-...

Could you tell me if this method works as efficiently as the native split of an AB Test activity ?

Adobe Target
1 Accepted Solution
ryanr701
Correct answer by
Employee
Employee

Hi @Tienzen

Yes, that should split traffic into 2 groups as efficiently as the native splitter.

Extra tip: if you modify the profile script to simply return the random number between 1-100 you can then use the audience rule to split to groups of: 2, 4, 5, 10, etc. Your current profile script will only allow you to use 2 groups - so it's not potentially as useful to you in the long run that way.

View solution in original post

4 Replies
ryanr701
Correct answer by
Employee
Employee

Hi @Tienzen

Yes, that should split traffic into 2 groups as efficiently as the native splitter.

Extra tip: if you modify the profile script to simply return the random number between 1-100 you can then use the audience rule to split to groups of: 2, 4, 5, 10, etc. Your current profile script will only allow you to use 2 groups - so it's not potentially as useful to you in the long run that way.

View solution in original post

Tienzen
Level 2
Level 2
Thank you @ryanr701 Has the native splitter got a balancing trafic behavior, depending on surplus of visits on an experience compared to the other ? If yes is it possible to replicate this behavior into a profile script ?
ryanr701
Employee
Employee
I believe the native splitter is also based on a random number generation. Your profile script should already be mimicking the same behavior. Here's a little in help docs on it. https://experienceleague.adobe.com/docs/target/using/introduction/how-target-works.html?lang=en#a%2F...