Matomo Tracker Proxy: Wrong IP address is tracked

Hi everyone,

I am using the Matomo Tracker proxy to hide the url of the actual tracker:

However, since I installed the proxy, all of the tracked visits are always from the same IP address (the proxy IP address I presume).

What can I do to actually record the correct (shortened) IP address?

Currently, Matomo cannot really disinguish between user sessions.

Thanks

Jens

The client-IP is passed with the “cip” parameter (https://github.com/matomo-org/tracker-proxy/blob/master/proxy.php#L116). For Matomo to read and accept this parameter to overwrite the IP address from the server request, the provided auth_token must be from a super user, admin or at least a user with write access to a given site-ID. Just “read” access is not enough.

More info: https://developer.matomo.org/api-reference/tracking-api (see section “Other parameters”)

2 Likes

Thanks Peterbo!

I changed the api user to admin and now I get the correct IP addresses!

I would have never figured that one out.

Have a great day

Jens

2 Likes

Hi,

I added a sentence to the help to make this more obvious: