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

//Crusty old DTM way - Session cookie
_satellite.setCookie("favoriteThing", "kittens");
//Shiny new Launch way - Session cookie
_satellite.cookie.set("favoriteThing", "kittens");

//Crusty old DTM way - 1 year expiration
_satellite.setCookie("favoriteThing", "kittens", 365);
//Shiny new Launch way - 1 year expiration
_satellite.cookie.set("favoriteThing", "kittens", { expires: 365 });

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 updated