I'm trying to accommodate GDPR by not loading our analytics scripts until the user consents.
The way I'm doing it works as expected in every browser we support but FF Quantum's private browsing window. (If it helps, it works as expected in Chrome Incognito)
This is the code that I'm using below:
/**
* @name loadAnalytics
* @function
* @param {boolean} [consented] Determines if the consent click event should be tracked
*/
function loadAnalytics( consented ){
if( analyticsExists() ) return callbackAnalytics( consented );
if( !window.analyticsScriptURL ) return;
var script = document.createElement( 'script' );
script.src = analyticsScriptURL;
script.type = 'text/javascript';
script.async = true;
script.onload = script.onreadystatechange = callbackAnalytics.bind( this, consented );
document.head.appendChild( script );
}
Is this a security thing or is there something I'm missing?
After some research. It seems like the main reason you cannot load the script on the firefox private browser is because of tracking protection that is enabled by default.
You could try to disable it and see whether it happened again or not.
For further reference. Please see this https://support.mozilla.org/en-US/kb/tracking-protection?redirectlocale=en-US&redirectslug=tracking-protection-pbm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With