Understand how cookieLifetime variable impacts Visitor Identification when set to NONE as compared to not set.

Understanding s.cookieLifetime

The s.cookieLifetime is a variable which is used to manipulate the Analytics Cookies expiration as needed. With this variable, you can set your cookies to expire as and when needed. To understand how this works and impacts the Cookie Redirects on the site, we will consider the following four scenarios. Wherein we would be setting the cookieLifetime to NONE along with having the browser to accept / reject the cookies (in which case the Fallback ID , IP+UA combination would be used). This will help in understanding the behavior and how it would impact the visitor identification.

 

 

s.CookieLifetime

Default

None

 

 

 

Cookies allowed in browser

Yes

Tracking behavior = Normal

 

302-Redirect with Set-Cookie = On first request

 

Tracking behavior = New visitor for each request

 

302-Redirect with Set-Cookie = Never

 

No

Tracking behavior = Normal

 

302-Redirect with Set-Cookie = On every request

Tracking behavior = New visitor for each request

 

302-Redirect with Set-Cookie = Never

 

 

Results

Scenario 1: The visitor identification will be as per the normal behavior since no cookie is getting blocked or reset.

Scenario 2: The s.cookieLifeTime variable will prevent the 302 Cookie redirect. The redirects are triggered to set the cookie but since configuration is not allowing the cookie to be set, no redirects.

Scenario 3: There will be a 302 Cookie redirect on every server call to invoke the IP+UA combination to be set on every server call to ensure consistent tracking for the visitor since no cookie is being set for the visitor as they are being blocked by the Browser.

Scenario 4: The IP+UA method will not work because variable is not letting the redirects trigger as cookielifetime is set to none. In the 302 Cookie redirect, the Javascript tries to set the cookie along with the Visitor ID but as the library reads the lifetime function, no 302 Cookie redirect will trigger.

Esta obra está autorizada con arreglo a la licencia de Reconocimiento-NoComercial-CompartirIgual 3.0 Unported de Creative Commons.  Los términos de Creative Commons no cubren las publicaciones en Twitter™ y Facebook.

Avisos legales   |   Política de privacidad en línea