opt out for EU implementation please
-
my lawer said i need to add this code, so the visitors can opt-out.
do you also support this code? i have premium better-analytics.[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
<script> // Set to the same value as the web property used on the site var gaProperty = 'UA-gdsjdfjhsgdjlf'; var _gaq = _gaq || []; _gaq.push(['_setAccount', gaProperty]); _gaq.push(['_gat._anonymizeIp']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); // 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> <script> jQuery(document).ready(function(){ jQuery('#GAOptOut').click(function() { gaOptout(); GAOptOutFeedback (); }) if (document.cookie.indexOf(disableStr + '=true') > -1) { GAOptOutFeedback (); } function GAOptOutFeedback () { jQuery('#GAOptOutBr').before(navigator.appName+'-'); jQuery('#GAOptOutDom').after(': <a href="'+window.location.origin+'">'+window.location.origin+'</a>'); jQuery('#GAOptOutFeedback').remove(); jQuery('#GAOptOut').after('<span id="GAOptOutFeedback" style="color:#FF0000"> (Stand: Opt-Out-Cookie ist gesetzt)</span>'); }; }); </script>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘opt out for EU implementation please’ is closed to new replies.