cookieDomainPeriods

IMPORTANT
This variable is deprecated. If you use any of the following:
  • AppMeasurement v2.26.x or later
  • Adobe Analytics extension v1.9.4 or later
  • Adobe Experience Cloud ID service
This variable does nothing, as the applicable library automatically detects the domain to set cookies on.

The cookieDomainPeriods variable helped AppMeasurement determine where to set Analytics cookies by indicating that the top-level domain had an extra period in it. This variable allowed AppMeasurement to accommodate the extra period in the top-level domain and set cookies in the correct location. If your website’s top-level domain does not include an extra period, this variable is not required.

  • For domains like example.co.uk or www.example.co.jp, set this variable to "3".
  • For domains like example.nsw.gov.au, set this variable to "4".
  • For domains like example.com or products.example.org, omit setting this variable or set it to "2".
TIP
Do not take subdomains into account for this variable. For example, do not set cookieDomainPeriods on the example URL store.toys.example.com. AppMeasurement recognizes that cookies are stored on example.com, even on URLs with many subdomains.

For implementations on AppMeasurement v2.26.x or later, the s_ac cookie is used to help automatically determine the correct cookie domain. The library first attempts to write a cookie including two domain periods. If setting this cookie fails, it tries again, including more domain periods until it succeeds. This cookie is immediately deleted once set.

The Web SDK automatically determines the correct domain to set cookies.

Domain Periods is a field under the Cookies accordion when configuring the Adobe Analytics extension.

  1. Log in to Adobe Experience Platform Data Collection using your AdobeID credentials.
  2. Click the desired tag property.
  3. Go to the Extensions tab, then click the Configure button under Adobe Analytics.
  4. Expand the Cookies accordion, which reveals the Domain Periods field.

Set this field to 3 only on top-level domains that contain a period. Otherwise, this field can be left blank.

The cookieDomainPeriods variable is a string that is typically set to "3", only on top-level domains that contain a period. Its default value is "2", which accommodates most top-level domains like .com and .org.

// Manually set cookieDomainPeriods for domains with a period in the top-level domain, such as www.example.co.uk
s.cookieDomainPeriods = "3";
recommendation-more-help
b4f6d761-4a8b-4322-b801-c85b9e3be690