PiwikTracker PHP API - wrong visitor IP address

Hi,

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?

Thanks,

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?

regards

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:
$piwikTracker->setIp($_SERVER[‘REMOTE_ADDR’]);
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