Can Google Analytics Track IP Addresses?

Know who’s coming to website, with or without knowing their IP addresses. Why Google Analytics no longer collects this data from users.

Published Categorized as Marketing

For a long time, the IP address was one of the data points that marketers and their technologists collected in just about every transaction with their users.

With the advent of data privacy regulations such as the GDPR, the CCPA, and the LGPD, all of this changed—causing everyone in the industry to rethink the amount of data they collect from users’ visits and interactions with websites.

Those who build and sell tools for marketers also had to adapt, including Google.

This and next year, Google is in the process of rolling out Google Analytics 4 and sunsetting Google Analytics Universal Analytics. And with that overhaul comes a major change in how the world’s most popular analytics tool logs and processes IP addresses.

It actually no longer does.

The most recent version of Google Analytics, Google Analytics 4, doesn’t read or collect the IP addresses of your website’s visitors.

Google says you shouldn’t send personally identifiable information (PII) to Google Analytics. Since IP addresses can be used to identify individual users, they can be considered PII in certain cases, so you shouldn’t send users’ IP addresses to GA4 either.

Why Google Analytics Stopped Collecting IP Addresses

The IP address of your website’s visitors was one of the data points that the old version of Google Analytics, called Universal Analytics, used to collect from every page view.

In fact, Google Analytics Universal Analytics had IP address collection enabled by default.

To bring their website analytics in line with the strict requirements of the GDPR, marketers had to activate IP anonymization, a special setting that replaced the last two digits of each visitor’s IP address with zeros for data protection purposes.

Still, everyone knew that IP anonymization, which is basically IP masking, was a temporary patch—not a long-term solution.

Universal Analytics was launched in 2013 as a major overhaul of the then Google Analytics measurement library. This was long before the notion of data privacy was on everyone’s lips and privacy regulations, such as the European Union’s GDPR, the state of California’s CCPA, and Brazil’s LGPD, became a thing.

With Google Analytics 4, Google is no longer collecting IP addresses in Google Analytics. Or, as the company says in Google’s documentation on IP anonymization, “In Google Analytics 4, IP anonymization is not necessary since IP addresses are not logged or stored.”

The good news for all of us who use the tool is that Google has found a way to phase out the collection of IP addresses without compromising on the quality of the measurement that you get.

And, because this measurement is based on first-party cookies, it won’t be impacted by the phase-out of support for third-party cookies by web browsers.

What If You Want to Collect IP Addresses in Google Analytics?

As we already touched on, you should think twice before sending data that can be considered “personal data” to Google Analytics, as Google itself advises against it.

However, if you need to send some sort of network-based identifier to Google Analytics for one reason or another, consider hashing the IP address and sending it as a custom dimension.

The hashed IP address can still be used to identify a person and can therefore be interpreted as personal data. Like the IP anonymization feature in Google Analytics Universal Analytics, this personal data is masked and processed in a more privacy-friendly way.

If you choose to go this route, be sure to obtain the necessary consent and disclose this collection appropriately in your privacy policy.

In Summary

No, Google Analytics 4 doesn’t collect IP addresses, and it isn’t a good idea to send users’ IP addresses to Google Analytics property as they can fall under the definition of personal data.

If you do want to save a network identifier in Google Analytics, consider hashing the IP address and sending the hash as a custom dimension to your page views.

And do not forget that this may require an update to your website’s consent collection practices and privacy policy.

Why You Can Trust Us

We are The Agency That, a boutique agency that helps major brands, fast-growing startups, and big-time influencers win at digital marketing.

For our clients, we take care of everything from ads and sales funnels to content marketing and online reputation management in a way that gets them results and helps them win the hearts and minds of their audiences.

If you think we can help you and your organization, don’t hesitate to get in touch!

Leave a comment

Your email address will not be published. Required fields are marked *