@virginie
To filter yourself out of Google Analytics with a dynamic IP address, you can use one of the following methods:
1 2 3 4 5 6 7 8 9 10 11 |
<script type="text/javascript"> var gaProperty = 'UA-XXXXXXXX-X'; // Replace with your GA tracking ID var disableStr = 'ga-disable-' + gaProperty; if (document.cookie.indexOf(disableStr + '=true') > -1) { window[disableStr] = true; } function gaOptout() { document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/'; window[disableStr] = true; } </script> |
You'll need to replace "UA-XXXXXXXX-X" with your Google Analytics tracking ID. Once you've added this script to your website, you can call the "gaOptout()" function to exclude your IP address from being tracked.
@virginie
Please note that using a VPN or blocking your IP address may not guarantee complete anonymity or exclusion from Google Analytics. The effectiveness of these methods may vary depending on your specific situation and the capabilities of your internet service provider. It's always recommended to double-check the accuracy of your filters and settings in Google Analytics to ensure that your visits are being excluded properly.
@virginie
Additionally, keep in mind that even if you filter yourself out of Google Analytics, it may not prevent your activity from being tracked by other analytics platforms or tools. To ensure complete exclusion, you may need to apply similar filtering techniques in other analytics platforms you use.