Expand my Community achievements bar.

Join us for an upcoming in-person Adobe Target Skill Builders event ~~> We're hosting these live learning opportunities to equip you with the knowledge and skills to leverage Target successfully. Learn more to see if we'll be coming to a city near you!
SOLVED

Reset profile after 30 days

Avatar

Level 1

I want to hide certain experience for 30 days from a user on click of a button (say no thanks). I want activity to reappear after 30 days for the same user. I can do it easliy via cookie code but I want to use the profileScript capablity here. 

 

Any help highly appricated. 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @Garora81234,

 

adobe.target.trackEvent will be what you need to track with the click of a button or link. To integrate it into your page, you'll want to attach the code as an event handler for clicks on the element.

 

Here's some example code that would work: https://developer.adobe.com/target/implement/client-side/atjs/atjs-functions/adobe-target-trackevent...

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @Garora81234,

Hope I have understood you correctly. Maybe the following will help you:


In the profile you can write e.g. a timestamp. Via a profile script you can determine - whether the 30 days was reached or not - and set a value to e.g. 'true' or 'false'. Then you can create an audience - which is excluded in certain activities.

Avatar

Level 1

hi @Perrin_Ennen 

 

Thanks

 

That is fine. How can I link this to click of the button?. I got the profile script that keep on appending each day but I want that to start calcuating the days once you click the button. 

 

Also, after 30 days, I want to reset it back to the Zero days. 

Avatar

Correct answer by
Level 4

Hi @Garora81234,

 

adobe.target.trackEvent will be what you need to track with the click of a button or link. To integrate it into your page, you'll want to attach the code as an event handler for clicks on the element.

 

Here's some example code that would work: https://developer.adobe.com/target/implement/client-side/atjs/atjs-functions/adobe-target-trackevent...