I don't understand: https://cookieconsent.insites.com/documentation/disabling-cookies/
onInitialise: function (status) {
var type = this.options.type;
var didConsent = this.hasConsented();
if (type == 'opt-out' && !didConsent) {
// disable cookies
}
},
What do I have to put instead of "//disable cookies" to disable the cookies?
I think that you could add something like:
window['ga-disable-UA-XXXXX-Y'] = true;
Inside that section (see here). But it mostly depends your needs and your cookies you set.
Additionally I think that the script could be improved to use
if (navigator.doNotTrack && navigator.doNotTrack === 1) {
window['ga-disable-{{GA ID}}'] = true;
}
So we could use the "Do not track" option in the browser here. Not sure if that is already covered in the Insites CookieConsent script.
P.S. Keep noted that there exists currently a small bug (reported here).
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