Skip to main content
12 votes
Accepted

Rename SC_ANALYTICS_GLOBAL_COOKIE

With no obvious way of making Sitecore do our bidding, and me not finding any IIS configuration way of achieving this - I opt for a third solution. Enter a HttpModule to achieve this. Function is ...
Mark Cassidy's user avatar
  • 25.3k
9 votes
Accepted

Programmatically log visit when Analytics cookie is disabled

First of all, just to make it 100% clear: if you've disabled the tracker, then you can't track anything. No consent is required for session tracking According to the "EU cookie law", you cannot ...
Dmytro Shevchenko's user avatar
9 votes
Accepted

Ways to block SC_ANALYTICS_GLOBAL_COOKIE from being deployed?

You can create your own class: public class ClearCookieHttpModule : IHttpModule { public void Dispose() { } public void Init(HttpApplication context) { //...
Vlad Iobagiu's user avatar
  • 18.6k
8 votes
Accepted

How does xDB track individual visits?

xDB online visits, in most cases, map one-to-one to ASP.NET sessions. Generally, ASP.NET sessions are tracked in the browser using the cookie ASP.NET_SessionId, and the actual visit state (including ...
Dmytro Shevchenko's user avatar
7 votes

Sitecore 10.2 creates session data "sc_ct_trk"

Sitecore can collect telemetry metrics associated with certain Sitecore environments to help understand how their platform is used. One of the metrics is called XM.Foundation.Core.Nexus.WebSessions ...
Anna Gevel's user avatar
  • 1,988
7 votes

Setting expiry date for Sitecore Language cookie

I am not sure if there is an easier way to do this. But I've achieved this before by setting a custom language cookie and then set the context language in a HttpRequest pipeline processor based on the ...
jonasag's user avatar
  • 553
6 votes
Accepted

Setting expiry date for Sitecore Language cookie

There is no out of the box way to do this, you need to customize Sitecore.Context.SetLanguage function as /// <summary> /// Sets the current language. /// This to extend the sitecore default ...
Naim Alkouki's user avatar
5 votes

How does xDB track individual visits?

As you suspect; this is now session based. The principle works like this. Every time a new session starts; 2 sessions are actually kicked off on the server. A Device Session correspond to a ...
Mark Cassidy's user avatar
  • 25.3k
5 votes

Rename SC_ANALYTICS_GLOBAL_COOKIE

Unfortunately, there is not a way to do this. Have a look at the Sitecore.Analytics.Web.ContactKeyCookie class. You will find the following constant there: private const string ...
Zachary Kniebel's user avatar
5 votes
Accepted

How do I change the Sitecore Analytics cookie to be SameSite=None?

Change all cookies to SameSite=None A new KB article for SameSite with Federated Authentication is now available. In this article, one of the changes it suggests to make allows for ALL generated ...
Jason St-Cyr's user avatar
  • 6,791
3 votes
Accepted

Form's submit actions not working after disabling SC_ANALYTICS_GLOBAL_COOKIE cookie

I saw exactly the same issue when analytics cookie was blocked but form still was configured to use Robots Detection. There were 2 options to fix the issue: disable globally Robots detection with ...
Marek Musielak's user avatar
  • 23.9k
3 votes

Setting expiry date for Sitecore Language cookie

This may be a recent change (checked in 8.2 Update 4) - but the Sitecore API has an overload for the Sitecore.Context.SetLanguage method that should do what you want: Notice the 4th argument of ...
Joshua Petryk's user avatar
2 votes

Rename SC_ANALYTICS_GLOBAL_COOKIE

I don't think this is possible without custom code. The string appears hardcoded twice in sitecore libraries. Sitecore.Analytics.dll namespace Sitecore.Analytics.Web { public class ...
josedbaez's user avatar
  • 1,792
2 votes

Setting expiry date for Sitecore Language cookie

You will have to do this yourself. When the Language property of the current Context is set, Sitecore will store this as a cookie. However these are done via static-methods that can't be overridden. ...
Kasaku's user avatar
  • 4,184
2 votes

How to Enable SSL Secure for sitecore shell cookies

Sitecore describes it as a bug in their tracking system (reference number 232082) and provided a possible workaround which is worked for me. Open the “\Website\sitecore\shell\Applications\Content ...
Iresh's user avatar
  • 71
2 votes

Sitecore shared session state not working - session state works in each site, but not between sites

I've seen this happen with the Forms Authentication cookie before. Multiple instances of the same cookie get added and the most specific domain wins. I ended up creating a method to remove all but the ...
Dan Sinclair's user avatar
  • 5,395
2 votes

Tracking and identifying multiple users on the same session

No matter what, if you identify the user each time they log in, you will be fine. Tracker.Current.Session.IdentifyAs(source, identifier); If the husband is logged in, you will notice the Tracker....
Chris Auer's user avatar
  • 13.1k
2 votes

How to add Cookies banner in Sitecore?

You can go through the below link - https://doc.sitecore.com/xp/en/developers/sxa/93/sitecore-experience-accelerator/add-a-cookie-warning-message-to-your-site.html If you want to be compliant with ...
Gaurav Agarwal's user avatar
2 votes
Accepted

How to make the ASP.NET_SessionId cookies id as a secure

Along with the approaches you have tried, as you mentioned in the question, I would suggest you add HTTPOnly flag as appropriate for your cookies too. Add this to your web.config file. <system.web&...
Sumit Bhatia's user avatar
  • 5,216
1 vote
Accepted

Prevent Sitecore from creating the sitename#lang cookie in jss/nextjs app

Here is an example of how you can create a custom processor to remove the lang cookie for Layout Service requests: Create a new class that inherits from JssGetLayoutServiceContextProcessor. Override ...
Vishal Khera's user avatar
1 vote

Prevent sitecore from creating the the sitename#lang cookie

I'm not sure if it's the same processor but you might try the follow which removes the site cookie. <?xml version="1.0" encoding="utf-8" ?> <configuration xmlns:patch=&...
Michael West's user avatar
  • 18.3k
1 vote

Change value of SC_ANALYTICS_GLOBAL_COOKIE to false

I wouldn't recommend overwriting cookies that are set by the platform generally. I usually recommend make your own which you have full control over. Cookie editing is limited by domains. You couldn't ...
Anicho's user avatar
  • 1,429
1 vote
Accepted

Sitecore is setting same language cookie multiple times in response headers

I know this answer is late but just answering in case it might help someone else. I believe this is an ASP .NET bug more details can be found in this SO answer. Putting below code in the EndRequest ...
Jeroen's user avatar
  • 1,224
1 vote

Navigation between sites using same lang cookie

Are the sites on different domains? If so, I suspect it's a cookie issue. By default, Sitecore (and ASP.NET) will use a very specific domain for its cookies to limit the cookies to only that domain. ...
Dan Sinclair's user avatar
  • 5,395
1 vote
Accepted

Forms Authentication cookie with Sitecore

Seems that one does not have to authentication cookie after calling Sitecore.Security.Authentication.AuthenticationManager.Login() FormAuthentication.SetAuthCookie will be called after successful ...
nari447's user avatar
  • 407
1 vote

Browser Cookie Disabled, Sitecore behaviour

There are really 2 questions here. So lets deal with each of them: 1. Should I display a cookie notice? The answer to that is not really opinion based, its a legal issue. If you run a website that ...
Richard Seal's user avatar
  • 20.6k
1 vote
Accepted

sitecore_userticket cookie generated differently across Sitecore versions

Thanks to Hishaam Namooya who gave me the idea to the solution in his comment. Instead of creating the new ticket in the new version. I will make every version responsible for its own ticket cookie ...
Michael Saleeb's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible