theiconic / php-ga-measurement-protocol

Send data to Google Analytics from the server using PHP. Implements GA measurement protocol.
MIT License
655 stars 136 forks source link

Optional Anonymize IP #67

Closed monobook closed 4 years ago

monobook commented 5 years ago

https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#aip

For example, the IP will be anonymized if any of the following parameters are present in the payload: &aip=, &aip=0, or &aip=1.

I guess it should be optional and don't appear in payload as query parameter if false or null, because any values for this parameter (false by default) anonymize ip...