PiwikTracker PHP API - wrong visitor IP address


I’m using Piwik API PHP Class to manually track some actions on my website. I’ve noticed that for all actions logged this way Piwik reports the same IP address - local IP address of the server where PHP script was executed.

Is it a known behavior, can I change it to track original REMOTE_ADDR of the HTTP session?


Yegor Korzh

I’ve got the same problem here.

The script tracks the ip of my own server on a visit.
How can we get the real IP of the visitor?


It is a known limitation for the current Tracker API; see the feature request in http://dev.piwik.org/trac/ticket/1553

I have do:
But remain wrong…

It is definitely working now… But you need to also authenticate with &token_auth when “forcing” the visitor IP.

Ok thanks, solved