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.
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.

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.