• Skip to main navigation
  • Skip to main content
  • Jump to the main sidebar

Carlosmdh

  • Migra ahora a Google Analytics 4
  • Blog
  • Snippets
  • Tutorials
  • Q&A GA4
  • About Me
  • Contact Me

How to make IP anonymous in Google Analytics

22 mayo, 2018

The new General Regulations of Data Protection considers as sensitive information the IP of the user who visits our Web, and more if we send it to a third, like Google can be.

When we install Google Analytics on our Web, your JavaScript begins to collect data to send to your servers and with them to elaborate the reports that we see later. One of the Daros that collects, sends and processes is the IP of the user. For What?, for example to show us the reports of visits by geographical location (country, City....).

This with the new RGPD can become a problem, so why not mask the IP?. Fortunately, and for a long time, Analytics allows us to do this with a tiny modification in the tracking code that we add to our Website.

Table of contents

  • Mask the user's IP before sending it to Google Analytics
  • Masking the user's IP with Google Tag Manager
  • Conclusion

Mask the user's IP before sending it to Google Analytics

First of all, explain what Google Analytics does to mask the IP and reassure you, with this we will not lose the geographic reports of our visits!!!

Como te comentaba al principio uno de los datos que recoge Analytics y envía a los servidores de Googlees la IP del usuario. Y como ya sabrás la IP está compuesta por 4 grupos de números, que se llaman octetos, por ejemplo 12.214.31.256. Pues bien, lo que consigues con esta función del código de Analytics es eliminar el último octeto justo antes de procesar el hit y guardarlo en sus servidores, de forma que lo que guarda es la IP 12.214.31.0. Por cierto, si quieres que un día te cuente en un tutorial como lo hace, escríbeme en el formulario de contacto y estaré encantado en prepararlo.

Anonymize IP

And How do you do this? In the next Video we see it

Masking the user's IP with Google Tag Manager

You may have already noticed if you follow my posts that I'm quite friendly with Google Tag Manager, so in this tutorial I couldn't miss the procedure to anonymize the IP using Tag Manager, whether you enable the predefined tag or you decide to use a custom HTML tag. Remember that you can see how to do it in "How to add Google Analytics tag to WordPress".

Conclusion

Whether from a plugin inserted by us or from Tag Manager, anonymizing or masking the user's IP is a very simple process, and now that the RGPD comes into our lives, my recommendation is that you do it if or if, it doesn't cost you anything, it won't break anything in your WordPress or in your analytics and you can avoid problems in the future.

Here are the links to the plugin for add Global Analytics and the plugin for add Universal Analytics with the masked IP option.

See you in a future tutorial and remember that if you have any questions, you can send them to me through the contact form. I will be happy to answer you by email.

Google Analytics

Sidebar

Sidebar-Alt

Blog - Snippets - Tutorials

Privacy Policy - Cookie Policy - Change your Consent


carlosmdh © 2023 · Made with by carlosmdh

We use cookies to give you the best experience on our website.

Puedes aprender más sobre qué cookies utilizamos o desactivarlas en los ajustes.

Carlosmdh
Powered by  GDPR Cookie Compliance
Privacy summary

This website uses cookies so that we can provide you with the best possible user experience. Cookie information is stored in your browser and performs functions such as recognising you when you return to our site or helping our team understand which parts of the site you find most interesting and useful.

Strictly necessary cookies

Strictly necessary cookies must always be enabled so that we can save your cookie settings preferences.

If you disable this cookie we will not be able to save your preferences. This means that each time you visit this website you will have to enable or disable cookies again.

Cookies de terceros

Esta web utiliza Google Analytics para recopilar información anónima tal como el número de visitantes del sitio, o las páginas más populares.

Dejar esta cookie activa nos permite mejorar nuestra web.

¡Por favor, activa primero las cookies estrictamente necesarias para que podamos guardar tus preferencias!

Cookies adicionales

Esta web utiliza las siguientes cookies adicionales:

(Lista aquí las cookies que estás utilizando en la web.)

¡Por favor, activa primero las cookies estrictamente necesarias para que podamos guardar tus preferencias!

  • Español
  • Français