


Hi Community,
I have implemented the getTimeToComplete plugin in adobe launch following every step in the documentation, I am trying to clear the cookie after custom no of days, but it is always getting cleared after the session , is there any work around to avoid this? below is the sample code I am using
getTimeToComplete("start","test",30)
Views
Replies
Sign in to like this content
Total Likes
See if this works:
getTimeToComplete("start", "test", 30, "d");
As below page, please contact your organization’s Account Manager. They can arrange a meeting with a consultant for assistance!
Thanks!
- Adobe plug-in: getTimeToComplete
https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/gettimetocomplete.html...
Views
Replies
Sign in to like this content
Total Likes
First off, you should check what domain your cookies are being set against... have you configured your implementation for first party cookies, or are you still using a third party implementation.
However, first party isn't really enough... the landscape of cookies has changed so much. Even first party cookies are subject to deletion after 7 days in Safari due to Apple's ITP policies, and first party cookies that aren't set by the server or aren't set securely are more subject to deletion... then of course there is the settings on your browser, which can be configured to delete cookies when you close your session....
We used to use the getNewRepeat plugin to remember both 30 day and 365 day retention... but I now often see "30 day repeat" but "365 day new" which should be impossible... if a user has repeated in 30 days, they also repeated in 365.... so I just no longer trust that data.
These are just the new realities of "cookie-apocalypse" unfortunately.
However, that said, there are still a number of browsers that will take and use the cookies properly.... but when I tested this code:
getTimeToComplete("start","test",30)
It's setting a cookie expiry for 30 mins (not 30 days like it's supposed to)....
And no matter what value I pass, it's always 30 mins.... I think someone actually broke the plugin (it wouldn't be the first time).
Short of trying to rewrite the plugin, I'm not sure I can help you. This seems like someone at Adobe should fix their plugin.....
OR don't use their plugin, if you are comfortable with JS, you should be able to create easier to read and maintain code that does the same thing... basically they set a cookie called "test" (or whatever you want to call this usage) passing the current datetime stamp as the value and setting an expiry... when the test is stopped, I assume it reads the datetime value and compares it to the current datetime....
Views
Replies
Sign in to like this content
Total Likes
See if this works:
getTimeToComplete("start", "test", 30, "d");
Yeah, that works... looks like the documentation is missing information about the tp argument.... That really should be updated.
Views
Replies
Sign in to like this content
Total Likes
I've submitted a pull request for my documentation update suggestion: https://github.com/AdobeDocs/analytics.en/pull/247
Views
Replies
Sign in to like this content
Total Likes
Thank you , this worked appreciate your help!
Views
Replies
Sign in to like this content
Total Likes