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

The 1st edition of the Target Community Lens newsletter is out now! Click to the right to find all the latest updates
SOLVED

Storing and Retrieving data in Target using JQuery/JavaScript

Avatar

Level 2

I'm currently storing information in cookies. Example: how many times an ad have been shown to a user. This is all done through Jquery (custom code option within Adobe Target Visual Composer). I may have more than one targeted ad for one ad location.

 

I want to move away from cookies. Is there a way to store this information in Adobe Target instead? I want the information to be stored for a month or a time specified by me.

 

Can I use profiles to store this information as long as I want it and retrieve it whenever I want?

Is there another way I can store and retrieve information in Adobe Target?

 

Example:
var counter = ${profile.countValue};

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@arshdeepv954921  - by default profile scripts are stored for 14 days. This duration is reset if a visitor returns back within 14 days. To check what is this value for your account, go to Administration > Implementation > Implementation methods > Profile Lifetime.

 

If needed, you can get this changed to max 90 days by reaching out to client-care (https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/visitor-profile-life...). 

rajneesh_gautam_0-1649946683879.png

 

Hope it helps,

 

Regards

Rajneesh

0 Replies

Avatar

Community Advisor

If you store it via js code , then you can store it in the browser.

Con: It will be flushed when user deletes the cookies..etc 

 

 

If you use profile script , you can maintain the counter in the server side (at the target server side). This is the right way for capture such data.

Avatar

Level 2

That was the question.

 

If I use profile script, how long can I store the counter value on server side (target)? Is it possible to control the duration.

Avatar

Correct answer by
Community Advisor

@arshdeepv954921  - by default profile scripts are stored for 14 days. This duration is reset if a visitor returns back within 14 days. To check what is this value for your account, go to Administration > Implementation > Implementation methods > Profile Lifetime.

 

If needed, you can get this changed to max 90 days by reaching out to client-care (https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/visitor-profile-life...). 

rajneesh_gautam_0-1649946683879.png

 

Hope it helps,

 

Regards

Rajneesh