-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send IP address #33
Comments
A follow up: while having the IP information sent would still be a useful feature, it appears that it would not solve the issue about IP filtering. Apparently, IP addresses sent via the Measurement Protocol are automatically anonymized (just as if This means that filters are bound to be inefficient as they can only act on the first three blocks of the IP address. More details in this StackOverflow answer. I have tested this behaviour by including my ip address in an exclude-filter in GA, and by adding the following line to $payloadData['uip'] = '<my ip address>'; Even though the IP data was sent correctly, the filters in GA didn't fire. In my humble opinion, the case for implementing this feature still stands, as sending the correct IP in anonymized form is in most cases more useful than always sending the server IP. |
Hey @coccoinomane thanks for your suggestion, i will look into this and try to give some feedback 👍 |
Hi ins0! I have sent a pull request that forces the tracker to send IP information as well, in anomyzed form. It works for me both locally and on a website I have on SiteGround. Please let me know if you need any clarifications :-) |
Hello!
First of all, thank you for this nice tool. I prefer it over other the alternatives because it is simple and lightweight. Well done!
Now, as for the issue: would it be possible to support in GMPC the IP override parameter? I am referring to the 'uip' parameter from https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#uip.
A bit of context. I often set IP-based filters in my GA views. When I use GMPC, however, the IP sent to GA seems to be the server IP rather than the client IP.
If needed, I have written a function based on a Stack Overflow answer in order to extract the client IP; you can find the function here: https://gist.github.com/coccoinomane/4c420776dc16d80ea772aff06d3e1ef4
Thank you,
Guido
The text was updated successfully, but these errors were encountered: