var gaProperty = 'UA-73281135-2'; var disableStr = 'ga-disable-' + gaProperty; if (document.cookie.indexOf(disableStr + '=true') > -1) { window[disableStr] = true; } function gaOptout() { alert("Das Opt-Out-Cookie wurde gesetzt. Die Erfassung Ihrer Daten wird verhindert."); document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/'; window[disableStr] = true; } jQuery(document).ready(function(){ jQuery('#analyticsOptOut').click(gaOptout); });