Reset profile after 30 days | Community
Skip to main content
Level 2
February 22, 2023
Solved

Reset profile after 30 days

  • February 22, 2023
  • 1 reply
  • 1154 views

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. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Matthew_Ravlich_ACG

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/

1 reply

Perrin_Ennen
Community Advisor
Community Advisor
February 23, 2023

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.

Level 2
February 23, 2023

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. 

Matthew_Ravlich_ACG
Community Advisor
Matthew_Ravlich_ACGCommunity AdvisorAccepted solution
Community Advisor
March 2, 2023

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/