Skip to content

Send client's IP to GA #36

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Send client's IP to GA #36

wants to merge 3 commits into from

Conversation

coccoinomane
Copy link

Fix issue #33.
The IP is added to the payload data in getTrackingPayloadData().
The function 'getClientIp' is introduced to obtain the client's IP.
Note that GA will anonymize the IP, so make sure that your IP filters in GA do not rely on the last three digits of the IP.

The IP is added to the payload data in getTrackingPayloadData().
The function 'getClientIp' is introduced to obtain the client's IP.
Note that GA will anonymize the IP, so make sure that your IP filters in GA do not rely on the last three digits of the IP.
For details, see issue #33
@ins0
Copy link
Owner

ins0 commented May 23, 2017

Thanks @coccoinomane. Could you please fix the failed build

undefined index REMOTE_ADDR
..asurement-php-client/src/Racecore/GATracking/GATracking.php
A TOTAL OF 4 ERRORS AND 0 WARNINGS WERE FOUND IN 1 FILE

@coccoinomane
Copy link
Author

Hi @ins0! I included isset() checks in the getClientIp() function; this fixes the PHP notice.
The checks have re-run and report again failure, but this time it seems to be a problem in the check itself, something related to a failed composer update => http://d.pr/i/TeT8y

@ins0
Copy link
Owner

ins0 commented May 23, 2017

HHmm currently not a home, looks like some wired change will have a look later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants