Hey folks. I’ve upgraded to 1.6 from 1.5 smoothly and there didn’t appear to be any errors. I use Piwik to track three different sites. Under the Visitors in Real Time gadget, on one site it tracks just fine, but on another it does not track any pages and just seems to list everything as “Direct entry”.
It’s one Piwik installation on one server hosting both sites. Other than the upgrade, nothing else has changed. Any help appreciated.
Hey Matt. Yes, whatever the version that preceded 1.6 was, it worked with referrer / visitor tracking on all my sites. Now it only seems to work on one of them.
Check that the Piwik domain name in your Javascript tracking code is correct (this URL is in the second line of the Piwik tracking code).
There have been cases of missing referrers when the Piwik JS code in the pages points to a URL that returns a 302 response instead of the final destination. It seems that some webserver compromise the tracking request when such redirects occur. Check in particular if the URL (doesn’t) contains “www.”. Also, if the server does an automatic redirection from http to https which also affects tracking requests to piwik.php, it might create problems such as missing referer data. Make such any http->https redirection excludes piwik.php requests.
Hey Matt. I understand. I need the redirect from http to https for security reasons. Since it was working just fine before the upgrade to 1.6, it must be a bug in piwik since this kind of redirect isn’t really considered a bug in Apache, but a pretty standard type of redirect. Do you have a workaround?
The problem is that the redirect, also re-encodes the parameters to piwik.php and then they are double encoded causing them not to be picked up by piwik.
Advice: Disable auto https redirection for requests to piwik.php
Otherwise, change http:// to https:// in your tracking code to always load it directly from https, that might fix the issue?
I will let you know if it works. If it does, it might be a good idea if the code that generates the tracking code is patched to write out https instead of http when piwik is accessible only over https.
Hey Matt, it works! Thank you so much! I really suggest now that the piwik generation code spits out https instead of http if it knows its being hosted over https. Would probably save a lot of headaches.