Hallo *,
ich brauche in meiner Datenschutzerklärung einen extra Link "Google Analytics deaktivieren" und habe das übliche kleine Script verwendet.
<script type="text/javascript">
// Set to the same value as the web property used on the site
var gaProperty = 'UA-xxxxx-xx';
// Disable tracking if the opt-out cookie exists.
var disableStr = 'ga-disable-' + gaProperty;
if (document.cookie.indexOf(disableStr + '=true') > -1) {
window[disableStr] = true;
}
// Opt-out function
function gaOptout() {
document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
window[disableStr] = true;
}
</script>
Es scheint nun aber so, als habe der Aufruf des Scripts überhaupt keine Auswirkung auf die von GA gesetzten Cookies.
Die Frage ist, ob solch ein einzelner Link ganz anders umgesetzt werden muss, weil ich die Contao-Cookiebar von Oveleon nutze.
Wäre sehr froh über gute Nachrichten und praktische Tipps!
Viele Grüße -
Christian
Lesezeichen