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

SOLVED

getTimeToComplete by default expiring after session

Avatar

Level 1

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)

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

See if this works:

getTimeToComplete("start", "test", 30, "d");

View solution in original post

0 Replies

Avatar

Employee

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...

Avatar

Community Advisor

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.... 

Avatar

Correct answer by
Community Advisor

See if this works:

getTimeToComplete("start", "test", 30, "d");

Avatar

Community Advisor

Yeah, that works... looks like the documentation is missing information about the tp argument.... That really should be updated.