cookieDomain
trackingServer
instead.The cookieDomain
variable determines the domain where AppMeasurement sets cookies. You can use this variable to explicitly set the cookie domain instead of using the cookieDomainPeriods
variable.
This variable only needs to be used when both of the following conditions are met:
- If your implementation uses first-party cookies. This variable is not required with implementations using a
trackingServer
value containingsc.adobedc.net
. - If your domain has a period in its suffix. For example,
example.co.uk
could use thecookieDomain
variable to explicitly state that the cookie domain isexample.co.uk
and notco.uk
.
Only a small number of implementations have use for the cookieDomain
variable, and even then, alternative variables like cookieDomainPeriods
can be used instead.
Cookie Domain using the Web SDK
The Web SDK can determine the correct cookie storage domain without this variable.
Cookie Domain using the Adobe Analytics extension
There is not a dedicated field in the Adobe Analytics extension to use this variable. Use the custom code editor, following AppMeasurement syntax.
s.cookieDomain in AppMeasurement and the Analytics extension custom code editor
The cookieDomain
variable is a string, and is set to the domain that you want to store cookies on.
s.cookieDomain = "stats.example.com";