Sending geo data or anonymized ip via API?

finally found the right category for my questions regarding the API :slight_smile: As my website uses a single incoming stream from the browser in order to feed data to PiwikPro, a first party database and (if visitor gave consent) GA + GA4.

While keeping the users ip and user agent behind a first party endpoint as a “privacy proxy” usually is a good thing I still wonder if there is a way to forward the visitor´s ip to PiwikPro when using the API. I will not say the “M” word, but I tried cid unsuccessfully :expressionless:

Next logical thing seemed to be sending a x-forwarded-for header along with the data but that did not have any effect either.

Is there something planned to tackle this point or an existing way to let PiwikPro know the ip and / or location, isp or other attributes? This could close a gap whenever someone uses the API to send data from a website… which might get a lift now that the google tag manager community template gallery just opened for serverside tags as well?

Using x-forwarded-for to override IP addresses is available in the on-premises or private cloud versions. There is, however, a parameter for overriding the IP directly via the tracker API - it’s called cip. For now, it requires additional authentication (see the http api docs). That won’t be the case after the Core plan goes out of beta. API token can be obtained via support, so please contact me on priv, so I can send you further instructions.

1 Like