_satellite.setCookie
This function, along with its siblings, _satellite.readCookie and _satellite.removeCookie, were provided in DTM to perform basic client-side cookie operations.
It took three parameters: cookieName, cookieValue, and daysToExpiration.
Remedy:
This, and the others mentioned above still exist in Launch, but have been deprecated and will be removed at some point int the future. The best guidance it to replace them with the new set of cookie utility calls in Launch.
1
//Crusty old DTM way - Session cookie
2
_satellite.setCookie("favoriteThing", "kittens");
3
//Shiny new Launch way - Session cookie
4
_satellite.cookie.set("favoriteThing", "kittens");
5
6
//Crusty old DTM way - 1 year expiration
7
_satellite.setCookie("favoriteThing", "kittens", 365);
8
//Shiny new Launch way - 1 year expiration
9
_satellite.cookie.set("favoriteThing", "kittens", { expires: 365 });
10
Copied!
Under the covers, Launch uses the npm js-cookie package. You can find extended usage here: https://www.npmjs.com/package/js-cookie#basic-usage
Last modified 1yr ago
Copy link