0

We are using Sitecore 10.2.2 version. We noticed that when user closes the browser and revisits the website in same browser SC_ANALYTICS_GLOBAL_COOKIE gets renewed. So Sitecore is unable to identify the contact and personalization is failing on revisit.

Any idea what could be causing this?

Already verified Analytics.CookieLifetime and it has default value. And Analytics.CookieDomain has default value.

1
  • Does the request which responds with setcookie send SC_ANALYTICS_GLOBAL_COOKIE to the server?
    – Marek Musielak
    Commented Apr 27 at 3:45

1 Answer 1

0

Looks like this is the default behavior. Decompiled Sitecore.Analytics DLL and checked Sitecore.Analytics.Web.ContactKeyCookie class which has Save method.

Cookie expires has logic which can either set -1 days to delete the cookie or set expires to value passed in Analytics.CookieLifetime setting.

Logic from DLL->

httpCookie.Expires = (IsInvalid ? DateTime.UtcNow.AddDays(-1.0) : DateTime.UtcNow.AddHours(AnalyticsSettings.CookieLifetime));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.