Ok, here is the situation. And yes I read the forums, and searched them, and read the docs.
Anyway,Piwik is tracking just fine. But… all my visitors are being listed as having my webhosts IP address, and their provider being my web hosting provider. And yes, I can easily get visitor IP from other scripts on my site, so my web host isn’t sending the wrong IP information. Piwik does seem to be differentiating between browsers and OSs just fine, and even some countries (I think it’s doing that via language). So Piwik is tracking, it just isn’t pulling the correct IP address, which is an incredibly important aspect for me.
Normally this would be easily fixable, because you do have a way to force an IP address; the setIp method, but sadly that is “allowed only for Super User, must be used along with setTokenAuth()” which, frankly makes no sense what-so-ever. In an ideal world, I’d just pass along the proper IP via this method… but… well it’s restricted.
Here is a copy of my tracking code. For security reasons the tracker is renamed, along with the piwik directory. Again, these are not issues because piwik is tracking, just not correctly. The $PageTitle and $PageUrl variables are obvious and also tracking perfectly.
// – Piwik Tracking API init –
PiwikTracker::$URL = ‘Sign in’;
$t = new PiwikTracker( $idSite = 1, ‘Sign in’);
// Optional function calls
//$t->setPlugins($flash = true, $java = true, $director = false);
// set a Custom Variable called ‘Gender’
//$t->setCustomVariable( 1, ‘gender’, ‘male’ );
// Mandatory: set the URL being tracked
$t->setUrl( $url = $PageUrl );
// Finally, track the page view with a Custom Page Title
// In the standard JS API, the content of the tag would be set as the page title
Now, just to make sure you know I did troubleshoot this, I’m going to answer some of your troubleshooting advice from your website. Hopefully this all is enough data for you to work with.
“2) Make sure you are viewing reports for the correct website and date in Piwik”
Yes I Am
“3) Please wait at least 10 seconds after generating visits on your website: by default Piwik will only process reports every 10 seconds when “today” is selected.”
Does Not Relate to my problem as the reports are there, they are just showing the wrong IP address.
- “If your Piwik tracking code is properly installed, Piwik would record visits in your database. You can use phpMyAdmin to look at the table “piwik_log_visit” and see if there are visits recorded.”
Oh, all sorts of rows. All showing my webhosts IP address and my webhost name as provider.
Gone through it backwards and forwards.
“7) Access to piwik.php fails”
Not an issue.
“8) Tracking https (SSL) pages”
Not an issue.
“9) Local copy of piwik.js outdated”