Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I anonymize IPs in Google Analytics and still track unique visitors?

I am most interested in an answer for Android, though it would be great to know if the answer is generalizable to websites, iOS, etc. Can I anonymize IPs (using setAnonymizeIp()) in Google Analytics and still track unique visitors? I understand Google Analytics uses cookies for websites, and so I thought it might be possible (or perhaps even automatic).

like image 345
SansWit Avatar asked Nov 05 '11 06:11

SansWit


People also ask

Does Google Analytics anonymize IP addresses?

The IP-anonymization feature in Universal Analytics sets the last octet of IPv4 user IP addresses and the last 80 bits of IPv6 addresses to zeros in memory shortly after being sent to Google Analytics. The full IP address is never written to disk in this case.

Should I anonymize IP addresses?

Why anonymize IP addresses? According to the GDPR, IP addresses are considered as PII (Personally Identifiable Information). So if you use a Google Analytics account, you'd require to prevent the storage of your website users' IP address information.

Can you exclude IP addresses from Google Analytics?

From the Select filter type menu, select Exclude . From the Select source or destination menu, select traffic from the IP addresses. From the Select expression menu, select the appropriate expression. Enter the IP address or a regular expression.

How do you hide IP address in Google Analytics?

Leave the Filter Type as Predefined. Click the Select filter type drop-down menu and select Exclude. Click the Select source or destination drop-down menu and select traffic from the IP addresses. Click the Select expression drop-down menu and select that are equal to.


1 Answers

Yes. The only effect that the anonymizeIp function is that it instructs Google to remove the last octet of the IP address from it's logs.

So, if your user's IP is:

123.45.678.90

And you run this function, Google will store it as:

123.45.678.XX

The only practical effect is that this results in less accurate Geographic reporting, but that's it. It won't affect counts of unique visitors in any way, and is totally unrelated to how GA tracks unique visitors, since Google Analytics does not rely on IP addresses for unique visitor identification. For websites, maintaining unique user identification is done by the Google Analytics cookies. In this specific case, the Google Analytics Android SDK handles the user session management for you using a local storage mechanism analogous to cookies.

like image 124
Yahel Avatar answered Sep 17 '22 17:09

Yahel