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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

exit pop up AB Test

Nsingh11
Level 1
Level 1

Hi, I am using this template to setup a pop up at the time of user exit: https://github.com/Adobe-Marketing-Cloud/target-experience-templates/tree/master/lightbox-exit-inten.... It works great except I am not able to limit it once per session. Currently it shows on all pages when i hover over close button. I am ok limiting this once per visitor level too or even cookie. Is there a way to do that in target? I know there is one way where you can chose your reporting source as "Adobe Target" and you could go into the Advanced settings in the success metric and choose the option that increments the count and then bars from re-entry and set a  user to convert right away, like on user seeing **any mbox**. However I want to use A4T so I can do my reporting in analytics.

 

Please let me know if anyone has found a way to do this!

1 Accepted Solution
Gaurav_Singh
Correct answer by
Employee
Employee

@Nsingh11  you may try using profile script to restrict user on bases of sessionId , count of visit or whether visitor is already part of the  . Few sample codes can be found here : https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/profile-parameters.h... .

 

For example :

 

1.if you want to restrict the experience to specific URL then you may try this : 

 

if (page.url.indexOf('urlToMatch') > -1) {
return 1;
}else{
if (!user.get('nameOfScript')) {
return 0;
}
}

 

2.profile script to restrict user on bases of sessionId :

 

if(user.sessionId!=user.getLocal('lastSessionId')) {
user.setLocal('lastSessionId', user.sessionId);
return (user.get('visitCount') || 0) + 1;
}

 

You can also leverage Target goal conversion Advance settings and select "Increment Count, Release User & Bar from Reentry" . For more details you may refer to this document : https://experienceleague.adobe.com/docs/target/using/activities/experience-targeting/create-targetin... 

View solution in original post

1 Reply
Gaurav_Singh
Correct answer by
Employee
Employee

@Nsingh11  you may try using profile script to restrict user on bases of sessionId , count of visit or whether visitor is already part of the  . Few sample codes can be found here : https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/profile-parameters.h... .

 

For example :

 

1.if you want to restrict the experience to specific URL then you may try this : 

 

if (page.url.indexOf('urlToMatch') > -1) {
return 1;
}else{
if (!user.get('nameOfScript')) {
return 0;
}
}

 

2.profile script to restrict user on bases of sessionId :

 

if(user.sessionId!=user.getLocal('lastSessionId')) {
user.setLocal('lastSessionId', user.sessionId);
return (user.get('visitCount') || 0) + 1;
}

 

You can also leverage Target goal conversion Advance settings and select "Increment Count, Release User & Bar from Reentry" . For more details you may refer to this document : https://experienceleague.adobe.com/docs/target/using/activities/experience-targeting/create-targetin... 

View solution in original post

Nsingh11
Level 1
Level 1
Thanks a lot Gaurav. For some reason profile script did not work for us. We tried to write a function within custom code to set a cookie when user has viewed our pop up, that worked for us.
michaelb2913164
Level 1
Level 1

Hello Nsingh, can you please share the custom code you created for this? That would be great as im looking for the same solution. Many thanks!

gaureshk3014423
Level 9
Level 9

Hi @Nsingh11 

You can create profile script using 

user.isNewSession to return true false value and based on that create audience which u can use in Target activity