7.1K members online now
7.1K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

HitCallbacks blocked by Firefox Tracking Protection

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭



I'm experiencing that the HitCallback are blocked if the customer have Firefox with Tracking Protection enabled.


The hit callback is used to redirect when the customer click the payment method but with this option enabled, the order is not possible to finish.


Is there any way to detect if Tracking Protection is enabled with Java Script?


Note: navigator.doNotTrack; is not tracking protection.

Re: HitCallbacks blocked by Firefox Tracking Protection

Participant ✭ ✭ ✭
# 2
Participant ✭ ✭ ✭

If user has opted out of tracking in browser, I don't think it is possible to track that user/machine.

Best Regards,
GA Guru.

'Star' or 'Accept as Solution' if it helped.
Marked as Best Answer.
Accepted by topic author Presta L
January 2016

Re: HitCallbacks blocked by Firefox Tracking Protection

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Maybe I did not explain well.


I don't want to track this customer. I was looking to fix the callback redirection for continue the navigation.


Yesterday I was trying something, and finally I fixed the situation.


The Issue comes when the callback have anonymous function

// This code are blocked by Firefox Tracking Protection
ga('send', 'event', 'Checkout', 'Option', eventName, {
  'hitCallback': function() {
    document.location = link;

The Solution

// This code are not bloqued by Firefox TP, works too without timeout
ga('send', 'event', 'Checkout', 'Option', eventName, { 'hitCallback': redirectLink(link) }); setTimeout(redirectLink(link), 2000);
function redirectLink(link) { document.location = link; }