Created
May 8, 2018 20:25
-
-
Save vdite/c2e4c53d12e9b44f6d883a55bb3ae3f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html dir="LTR" lang="de"> | |
<head> | |
<script type="text/javascript"> | |
/** Disable tracking if the opt-out cookie exists. **/ | |
if (document.cookie.indexOf('optOutPlease=true') > -1) { | |
/** Opt-Out Cookie set here, no tracking, no Tagmanager **/ | |
}else{ | |
/** Put your Javascript Google Tag Manager code beneath | |
. | |
. | |
. | |
**/ | |
} | |
/** Opt-out function **/ | |
function doOptout() { | |
document.cookie = 'optOutPlease=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/'; | |
} | |
</script> | |
</head> | |
<body lang="de"> | |
<a onclick="alert('Google Tagmanger und damit die Ausführung aller Tracking Scripte wurden deaktiviert');" | |
href="javascript:doOptout()">Tracking deaktivieren</a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment