ins0 / ins0/google-measurement-php-client

Send IP address

Open
#33 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
51
Forks
23
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.