_satellite.setCookie(cookiename, value, days)

Avatar

Avatar
Validate 1
Level 2
sanketd28
Level 2

Likes

5 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
sanketd28
Level 2

Likes

5 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
sanketd28
Level 2

01-07-2018

Hi,

I would to set cookie using _satellite.setCookie(cookiename, value, days) but if you see the parameters, we have an option to expire it in days. On the other hand, I want to expire the cookie when user session ends. Is there any way to achieve this?

Thanks in Advance !

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Contributor
MVP
AlexisCazes
MVP

Likes

187 likes

Total Posts

424 posts

Correct reply

198 solutions
Top badges earned
Contributor
Shape 1
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Contributor
MVP
AlexisCazes
MVP

Likes

187 likes

Total Posts

424 posts

Correct reply

198 solutions
Top badges earned
Contributor
Shape 1
Give Back 10
Give Back 5
Give Back 3
View profile
AlexisCazes
MVP

04-07-2018

why don't you use a data element that expire at the session ?

Answers (2)

Answers (2)

Avatar

Avatar
Contributor
Level 3
Jason_Egan
Level 3

Likes

19 likes

Total Posts

11 posts

Correct reply

5 solutions
Top badges earned
Contributor
Shape 1
Ignite 1
Boost 5
Boost 3
View profile

Avatar
Contributor
Level 3
Jason_Egan
Level 3

Likes

19 likes

Total Posts

11 posts

Correct reply

5 solutions
Top badges earned
Contributor
Shape 1
Ignite 1
Boost 5
Boost 3
View profile
Jason_Egan
Level 3

10-12-2018

I know that this is a bit of an old post, but in case anyone searches for this and finds this post, it's worth noting that the _satellite.setCooke/readCooke/deleteCookie functions are not supported in Adobe Launch. So, you will run into problems when migrating there if you use these functions.

Avatar

Avatar
Validate 50
Level 7
marion33678522
Level 7

Likes

167 likes

Total Posts

170 posts

Correct reply

5 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 50
View profile

Avatar
Validate 50
Level 7
marion33678522
Level 7

Likes

167 likes

Total Posts

170 posts

Correct reply

5 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 50
View profile
marion33678522
Level 7

05-07-2018

Hello sanketd28​ ,_satellite.setCookie("helloCookie", "test", 0);

From old memory, I think if you give a 0 value, or no value at all, the cookie will expire after the session.

Such as :

_satellite.setCookie("helloCookie", "test", 0);

or


_satellite.setCookie("helloCookie2", "test2");

I did this a long time ago , you should still test it ! Dev tools (F12) in chrome or firefox, give you the expiration of all your cookies !

Cheers !

Mario