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 ...
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 ...
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)
{
//...
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 ...
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 ...
6
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
3
votes
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 ...
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 ...
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 ...
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.
...
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 ...
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 ...
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....
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&...
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 ...
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=&...
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 ...
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 ...
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. ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
cookies × 34xdb × 6
xconnect × 4
experience-analytics × 4
multilingual × 4
tracking × 4
sitecore-client × 3
pipelines × 3
session-state × 3
jss × 2
configuration × 2
security × 2
multisite × 2
authentication × 2
nextjs × 2
sitecore-commerce × 1
experience-editor × 1
azure × 1
personalization × 1
federated-authentication × 1
language-fallback × 1
layout-service × 1
ribbon × 1
sso × 1
shared-session × 1