내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Profile Scripts - How to create audiences based on new and returning visitors

Avatar

Level 2

Good Afternoon,

Hope everyone is safe and healthy.  

Our team is looking to set up a test on our homepage banner property. To do this we believe we will need to create a profile script in Target. The audiences would be as follows:

 

  • 1st visit: Support Message (COVID messaging)
  • 2nd visit: D2D Message
  • 3rd visit: Support Message (COVID messaging)
  • 4th visit: D2D Message

Just looking for some examples of profile scripts that would support the above sequuence.

Thank you very much in advance,

Alex

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi @alexe58360872  you can create a profile script as below :

 

Name : Impression

Code :

var freq = user.get("Impression") || 0;
freq+=1;
if (freq < 100)
{
return freq;
}

Now you can create an audience as Visitor Profile ---> user.Impression ---> contains static value ---> 1,3 ---> for Covid Message
Visitor Profile ---> user.Impression ---> contains static value ---> 2,4 ---> for D2D Message

Hope that helps you.

원본 게시물의 솔루션 보기

7 답변 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi @alexe58360872  you can create a profile script as below :

 

Name : Impression

Code :

var freq = user.get("Impression") || 0;
freq+=1;
if (freq < 100)
{
return freq;
}

Now you can create an audience as Visitor Profile ---> user.Impression ---> contains static value ---> 1,3 ---> for Covid Message
Visitor Profile ---> user.Impression ---> contains static value ---> 2,4 ---> for D2D Message

Hope that helps you.

Avatar

Level 2

@ambikaTewari_ATCI

Thank you very much.  Will try this out.  Much appreciated.

 

Cheers,

Alex

Avatar

Level 2
@ambikaTewari_ATCI - One quick question. Am I creating two different audiences (one for covid messaging, one for D2D) or one audience with two rules for the different messaging? CHeers!

Avatar

Community Advisor
You will create two audience one for covid and another for D2D.

Avatar

Level 2
@ambikaTewari_ATCI - thanks! Tested it out yesterday and looks like it's working. Thank you very much!

Avatar

Level 3

Hi @ambikaTewari_ATCI,

 

I tried what you explained and worked, but I'm having a problem with var freq.

 

Every time I change of page or refresh the one I'm using, freq get modified by 7 instead of by 1, even though I wrote the same code as you. 

 

Do you know what could been happening?

 

Thanks a lot

 

 

Avatar

Level 1

Hi @alexe58360872, I have tried but the count freq is not increased. do you have any idea?