Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards

How to control the popup Count based on the session in Adobe Target?

Avatar

Level 1

I am showing the pop-up on Experience Targeting activity. I want to show this popup one time in a session, so I have used the below profile script as user_freq,

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

Then use this scripts in audience attributes, the condition is user_freq < 2. But its not working properly, the popup showing again and again in a same session. 

 

3 Replies

Avatar

Community Advisor

Hi @jayasekar  In this case, the profile script alone won't work. You need to handle the logic for pop up to shown once. this you can do either setting up the flag for popup in session or in a cookie.

Avatar

Level 1

Hi @Gokul_Agiwal 

Thank you for the reply!

Is it possible to control the popup shown using the profile script?

Avatar

Community Advisor

HI @jayasekar   Yes its possible but it completely depends on your use case. 

For ex.

IF you're showing popup experience on page load once per session then it works however if you're showing this in middle of the journey then may not be good fit. 

Also if this you're trying with SPA  then profile script alone won't work here. You need to use logic at client side with Target param ..  

 

So could you please elaborate your use case and how your Target has been setup?