{"action":"created","issue":{"url":"https://api.github.com/repos/piwik/piwik/issues/10227","repository_url":"https://api.github.com/repos/piwik/piwik","labels_url":"https://api.github.com/repos/piwik/piwik/issues/10227/labels{/name}","comments_url":"https://api.github.com/repos/piwik/piwik/issues/10227/comments","events_url":"https://api.github.com/repos/piwik/piwik/issues/10227/events","html_url":"https://github.com/piwik/piwik/issues/10227","id":159974825,"number":10227,"title":"CIP variable is not parsed correctly","user":{"login":"RvMp","id":19911658,"avatar_url":"https://avatars.githubusercontent.com/u/19911658?v=3","gravatar_id":"","url":"https://api.github.com/users/RvMp","html_url":"https://github.com/RvMp","followers_url":"https://api.github.com/users/RvMp/followers","following_url":"https://api.github.com/users/RvMp/following{/other_user}","gists_url":"https://api.github.com/users/RvMp/gists{/gist_id}","starred_url":"https://api.github.com/users/RvMp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RvMp/subscriptions","organizations_url":"https://api.github.com/users/RvMp/orgs","repos_url":"https://api.github.com/users/RvMp/repos","events_url":"https://api.github.com/users/RvMp/events{/privacy}","received_events_url":"https://api.github.com/users/RvMp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-13T15:14:16Z","updated_at":"2016-07-08T00:12:08Z","closed_at":null,"body":"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.\r\n\r\nLog entry of apache on piwik server\r\n```\r\n**149.210.175.14** - - [13/Jun/2016:16:58:33 +0200] \"GET /piwik.php?\r\nidsite=8&rec=1&apiv=1&r=931302&cip=**80.64.22.145**&token_auth=XXXXXXXXX&_idts=1465819516\r\n&_idvc=48&_id=c2d888b3c72a4775&url=https%3A%2F%2Fwww.example.com%2F&urlref=&action_na\r\nme=Example+%7C+Piwik HTTP/1.1\" 200 215 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) \r\nAppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36\"\r\n```\r\nPHP code used\r\n```\r\nfunction htmlTitle($data) {\r\n  require \"assets/php/piwik-php-tracker.php\";\r\n  $t = new \\PiwikTracker( 2, 'http://piwik.externaldomain.com');\r\n  $t->setTokenAuth('XXXXXXXXX');\r\n  $t->setIp($_SERVER['REMOTE_ADDR']);\r\n  $t->doTrackPageView(\"$data\");\r\n  return $data;\r\n}\r\n```\r\n\r\nThe correct IP is 80.64.22.145 but PIWIK interface shows 149.210.175.14."},"comment":{"url":"https://api.github.com/repos/piwik/piwik/issues/comments/231243625","html_url":"https://github.com/piwik/piwik/issues/10227#issuecomment-231243625","issue_url":"https://api.github.com/repos/piwik/piwik/issues/10227","id":231243625,"user":{"login":"mattab","id":466765,"avatar_url":"https://avatars.githubusercontent.com/u/466765?v=3","gravatar_id":"","url":"https://api.github.com/users/mattab","html_url":"https://github.com/mattab","followers_url":"https://api.github.com/users/mattab/followers","following_url":"https://api.github.com/users/mattab/following{/other_user}","gists_url":"https://api.github.com/users/mattab/gists{/gist_id}","starred_url":"https://api.github.com/users/mattab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattab/subscriptions","organizations_url":"https://api.github.com/users/mattab/orgs","repos_url":"https://api.github.com/users/mattab/repos","events_url":"https://api.github.com/users/mattab/events{/privacy}","received_events_url":"https://api.github.com/users/mattab/received_events","type":"User","site_admin":false},"created_at":"2016-07-08T00:12:08Z","updated_at":"2016-07-08T00:12:08Z","body":"Hi @RvMp \r\n\r\nHere is what to do:\r\n* Enable tracker debugging: http://developer.piwik.org/api-reference/tracking-api#debugging-the-tracker\r\n* Open the page in a browser: `piwik.php?....` (get the request from your access log, after importing some data)\r\n* read the output message, and/or paste it here for us to review why the IP is not tracked properly"}}
{"actor":{"display_login":"mattab"}}