활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
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
해결되었습니다! 솔루션으로 이동.
토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.
@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