Using Piwik stats but getting ‘Page url not defined’ all the time?

For a while now I’ve been using Piwik stats instead of Google Analytics.
And it works nicely, mostly. Atleast the gathered stats are understandable now and I am much more up-to-date with trends and things on my site when it comes what you visitors do on it. This allows me to make a better site 🙂

But one thing, didn’t work… Page titles. Nobody seemed to report their page title. And as such a bunch of stats don’t work right.
If you have this annoying phenomenon, too. The fix is simple. Change your tracking code on your sites.

Tired of seeing “Page url not defined” in your page views?

After some searching I found that this may happen (and does happen a lot) on sites that do not use HTTPS while the Piwik sever is on HTTPS. That in itself is no problem. but Piwik assumes HTTP. If the HTTP request then gets redirected to HTTPS some variables are lost for some stupid reason.

So on each site you track with Piwik you simply have to replace the Agnostic link with a proper one. There are 2 links in the tracking code. Both start with //. Change that to either http:// or https://, depending on what URL your Piwik server operates on.


Save and upload your snippets and page titles and similar stats will be reported much more accurately.