Hi everyone,
I want to configure a profil script who is going to count the number of time that the mbox was viewed by a visitor.
After two times that my mbox was viewed by the user, the visitor is no more able to see the activity.
Ex : I have an activity that I want only to show to the user two times.
name of the mbox = home
it's possible to do that by a profil script ?
activity name = Security Ad
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
@A2896 this would be simple, setup a profile script with a name as per your preference and add this code and replace xyz as per mbox id and <<profile-script-name>> placeholder with profile script name. Create audience with visitor profile attributes nd select the profile script name you just created with evaluator as <= with static value comparison as 2. Finally use this audience as eligibility criteria.
if (mbox.name == 'xyz') {
return (user.get(<<profile-script-name>>) || 0) + 1;
}
}
#sample screenshot
@A2896 this would be simple, setup a profile script with a name as per your preference and add this code and replace xyz as per mbox id and <<profile-script-name>> placeholder with profile script name. Create audience with visitor profile attributes nd select the profile script name you just created with evaluator as <= with static value comparison as 2. Finally use this audience as eligibility criteria.
if (mbox.name == 'xyz') {
return (user.get(<<profile-script-name>>) || 0) + 1;
}
}
#sample screenshot
@nnakirikanti Many thanks for your answer, I'm going to try your solution. Thanks
Views
Like
Replies
Views
Likes
Replies
Views
Likes
Replies