Due to EU cookie law, I have a site where we are disabling the Tracker via a pipeline processor ala: Disable xDB tracking for single requests

By interacting with the site, this will serve as consent to use tracking cookies. Once consent it given, the plan is to programmatically log the initial page view without refreshing the entire page, if possible. It looks like we can programmatically register a page event (https://doc.sitecore.net/sitecore_experience_platform/developing/marketing_operations/events/register_a_page_event_programmatically) and there is a page event for "page visited."

My question is: can this even work when the tracker is not enabled? In order to register the event, it looks like it has to be attached to the interaction:

interaction.CurrentPage.Register(pageEventData);

  • 1
    Why do you need to completely disable the Tracker? Could you try to: 1. Cancel every page from tracking unless consent is given(Tracker.Current.CurrentPage.Cancel()) 2. Once the consent is given, accept modifications on the Tracker: Tracker.Current.Session.Interaction.AcceptModifications(); and recreate current page Tracker.Current.Session.Interaction.GetOrCreateCurrentPage(); 3. Continue working as usual, ie. register page event, etc. – grg May 24 '17 at 11:51
  • Thanks grg! Sounds like you and Dmytro have the same line of thought. Your comment additionally adds some ways to immediately start tracking once consent it given, which will be helpful! Thanks! – Craig Taylor May 25 '17 at 13:17
up vote 10 down vote accepted

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 store certain types of information in the user's browser without the user's consent. Some cookies are covered by this, but not all of them. For example, session cookies are exempt from the restriction (see here, section 3.1).

This means that user sessions are fine to track, and the ASP.NET session cookie does not require the user's consent. The Tracker mostly relies on the ASP.NET session, so you don't need to disable it. I believe you are free to track the first page of the visit without any consent from the user.

So. Don't disable the Tracker, as you are not obliged to.

Storing the Analytics cookie requires consent

The Analytics cookie is persistent, so it's not exempted from the user's consent.

I suggest that you prevent the Analytics cookie from being sent to the user's browser on the first request of the session. See the link below for how you can do that:

Ways to block SC_ANALYTICS_GLOBAL_COOKIE from being deployed?

I believe that the tracking will work fine without this cookie on the first request, and then the cookie will just be added to the user's browser on the second request.

  • Appreciate it, Dmytro. I figured with the Tracker disabled that it would prevent me from tracking, but needed confirmation that I wasn't missing anything. I disabled the Tracker after following that link and the link that was posted there. Will re-evaluate my attempt and look at @sitecore climber's solution to see if I can meet all the requirements of the client/cookie law. Thanks again! – Craig Taylor May 25 '17 at 13:14

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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