Skip to content

Send client's IP to GA - #36

Open
coccoinomane wants to merge 3 commits into
ins0:masterfrom
coccoinomane:coccoinomane-patch-ip
Open

coccoinomane wants to merge 3 commits into
ins0:masterfrom
coccoinomane:coccoinomane-patch-ip

Conversation

@coccoinomane

Copy link
Copy Markdown

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

ins0 commented May 23, 2017

Copy link
Copy Markdown
Owner

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
Copy Markdown
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

ins0 commented May 23, 2017

Copy link
Copy Markdown
Owner

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