setIp shows Ip as 0.0.0.0 even with setTokenAuth


#1

When I try to set the visitor ip address using the following code, I keep seeing 0.0.0.0 in Piwik.


$tracker = new PiwikTracker( $idSite = 1, 'http://site.com/' );
$tracker->setTokenAuth( 'TOKEN' );
$tracker->setIp( 'IP' );

The auth token is correct and the ip address is a string, as expected. I am running Piwik 2.13.1. Why doesn’t it record the correct ip?


(Matthieu Aubry) #2

Hi there,

it should work indeed. Are you sure the token_auth is correct?