@RvMp opened this Issue on June 13th 2016

It seems like when using the PHP API the IP (cip variable) is not correctly parsed in PIWIK (version: 2.16.1). The token is from a user with administrator privileges for that specific site.

Log entry of apache on piwik server

**** - - [13/Jun/2016:16:58:33 +0200] "GET /piwik.php?
me=Example+%7C+Piwik HTTP/1.1" 200 215 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36"

PHP code used

function htmlTitle($data) {
  require "assets/php/piwik-php-tracker.php";
  $t = new \PiwikTracker( 2, 'http://piwik.externaldomain.com');
  return $data;

The correct IP is but PIWIK interface shows

@sgiehl commented on June 13th 2016 Member

Does the user (token auth) you are using have admin access for the tracked

@RvMp commented on June 13th 2016

Yes. The token used is from a user with administrator privileges for that specific site.

By the way:
Even without specifically setting the setIp option this problem exists.
Apache log show that the CIP variable is set correctly but PIWIK seems to ignoring it.

@mattab commented on July 8th 2016 Owner

Hi @RvMp

Here is what to do:

@mattab commented on July 14th 2016 Owner

@RvMp please let us know if you can reproduce the issue and the debug output, we'd like to help solve this bug if it's confirmed :+1:

@mattab commented on August 23rd 2016 Owner

As we have not heard from you, closing the issue. Feel free to comment and re-open if you still experience the issue and have more info.

This Issue was closed on August 23rd 2016
Powered by GitHub Issue Mirror