cookieDomainPeriods
- AppMeasurement v2.26.x or later
- Adobe Analytics extension v1.9.4 or later
- Adobe Experience Cloud ID service
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
orwww.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
orproducts.example.org
, omit setting this variable or set it to"2"
.
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.
Cookie domain periods using the Web SDK
The Web SDK automatically determines the correct domain to set cookies.
Cookie domain periods using the Adobe Analytics extension
Domain Periods is a field under the Cookies accordion when configuring the Adobe Analytics extension.
- Log in to Adobe Experience Platform Data Collection using your AdobeID credentials.
- Click the desired tag property.
- Go to the Extensions tab, then click the Configure button under Adobe Analytics.
- 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.
Cookie domain periods in AppMeasurement and the Analytics extension custom code editor
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";