Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

RGPD - cookieLifetime  - write custom code to set a date on which to delete the cookie

Avatar

Level 2

Hello,

 

Currently we use cookieLifetime  variable to set the Adobe cookie limit on our website.

 

Seen with the new rules of RGPD, we fixed the expiry to 13 months to abide by the law.

 

Now we need to add a setting to make the cookies' expiry date not get renewed on every visit.

 

So for example : 

 

Visitor X : 

Visit 1 - 02/01/2022 : Cookie expires in 13 months - expiry date : 02/02/2023

Visit 2 - 12/03/2022 : Cookies already exist - expiry date shouldn't be renewed - cookies still have to expire on 02/02/2023

 

I checked the Adobe documentation, all I found is this:

 

  • 13-month cookie limit. You can override your analytics cookie expiration using the cookieLifetime variable. Experience Cloud cookies including Analytics and ECID extend the cookie expiration date with each visit. To set a static, non-rolling cookie expiration, you can either: (1) write custom code to set a date on which to delete the cookie, or (2) use your CMP to control the date of the cookie reset. cookieLifetime and Experience Cloud Cookies

Source : https://experienceleague.adobe.com/docs/analytics/admin/data-governance/cnil-consent-exemption.html?...

 

 

Has anyone ever done this using the first solution? As I am not able to find more information online.

 

Thank you

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Since this is a limitation in AppMeasurement or ECID itself, I don't think there's anything that you can do. You'll have to consult Adobe Client Care to see if they can get engineering to update their code to allow you to specify an expiry that never changes.

View solution in original post

3 Replies

Avatar

Employee Advisor

You may set an static expiry date by setting a string integer.

s.cookieLifetime = "86400";

 

See https://experienceleague.adobe.com/docs/analytics/implementation/vars/config-vars/cookielifetime.htm....

 

Avatar

Level 2

Hello,

 

I think you misunderstood my question.

 

We already assign cookieLifetime to 13 months in a string integer.

 

What I meant in my question is, how do I avoid that the cookie renews 13 months at every visit of the same user?

Thank you

Avatar

Correct answer by
Community Advisor

Since this is a limitation in AppMeasurement or ECID itself, I don't think there's anything that you can do. You'll have to consult Adobe Client Care to see if they can get engineering to update their code to allow you to specify an expiry that never changes.