- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
02-17-2016 01:18 AM
Hi
How does one set a sessoin cookie using, "utag.loader.SC"?
The main cookie article covers days and years only.
Thanks
Samrat D'souza
Solved! Go to Solution.
02-17-2016 01:21 AM - edited 02-18-2016 06:08 AM
For people looking for this Info:
For example using the utag_main time out value:
utag.loader.SC("utag_mycookie", {"mycookie1": "value;exp-session", "_st" : utag.data["cp.utag_main__st"]});
Or if you would like to set the session timeout period from when you set the cookie you can use:
utag.loader.SC("utag_mycookie", {"mycookie1": "value;exp-session", "_st" : ((new Date()).getTime() + parseInt(utag.cfg.session_timeout))})
utag.cfg.session_timeout, is by default 30 mins, which can be changed via the Publish Config Setting in TiQ.
Thanks to @adrian_browning.
02-17-2016 01:04 PM
@samrat_dsouza wrote:
For people looking for this Info:
utag.loader.SC("utag_main", {"total_price_cookie": tot_price_in_cart+";exp-session"});
Thank you @samrat_dsouza for sharing!
Copyright All Rights Reserved © 2008-2023