Why is the google analytics IP anonymization integration not detected?

Since google changes their protection of data privacy guidelines you should make sure to use the IP anonymization correctly.

If the integration on your website is being marked as wrong or crawlers can not identify it correctly please check for the following reasons:


1. Did you use the right order?
The correct order of code should be: First anonymize. Then send the data.
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');

2. Did you spell it right?
It is ""anonymizeIp"" and not ""anonimizeIP"". Uppercase ""I"", lowercase ""p"".

3. Are you using a valid code?
Please make sure that your code is not outdated.
Here is the link to Googles official guideline for IP anonymization: https://developers.google.com/analytics/devguides/collection/analyticsjs/#anonymizeip

4. Are you using the code more than once?
Please check if you use the code exactly one time. There is no need to use it twice.


There are two ways of embedding the code in your websites sourcecode:


a) classical analytics
code example:
<script type=""text/javascript"">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
_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);
})();

</script>

b) universal analytics
code example:
<script>

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXXXX-X', 'website.de');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');

</script>"

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk