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.

Cookie Lifetime is a dropdown under the Cookies accordion when configuring the Adobe Analytics extension.

  1. Go to and log in when prompted.
  2. Select Launch / Data Collection.
  3. Click Go to Launch / Data Collection, then select Tags.
  4. Click the desired property.
  5. Go to the Extensions tab, then click the Configure button under Adobe Analytics.
  6. Expand the Cookies accordion, which reveals the Cookie Lifetime dropdown.

This dropdown contains the following values:

  • Default: Cookie expires after 2 years.
  • None: AppMeasurement does not set cookies.
  • Session: Cookie expires at the end of the visitor’s session.
  • Seconds: Cookie expires after the specified number of seconds have elapsed. For example, setting this dropdown to Seconds and placing 86400 into the custom field forces cookies to expire after exactly 24 hours.

s.cookieLifetime in AppMeasurement and Data Collection 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";

On this page