Show Menu


Cookies set by AppMeasurement typically have an expiration of 2 years. Use the cookieLifetime variable to override the expiration date for cookies set by AppMeasurement.
This variable impacts unique visitor counts and attribution. Use caution when setting this variable.

s.cookieLifetime in AppMeasurement and Launch custom code editor

The s.cookieLifetime variable is a string that determines the expiration date of cookies set by AppMeasurement.
  • If set to SESSION , cookies set by AppMeasurement expire after the browser session completes.
  • If set to NONE , AppMeasurement does not attempt to set cookies.
  • If set to an integer string, cookies set by AppMeasurement expire after the specified number of seconds have elapsed.
// Expire cookies after each session
s.cookieLifetime = "SESSION";

// Expire cookies after exactly 24 hours
s.cookieLifetime = "86400";