Strange data after moving site to https


Hi all,

After moving my site from http to https some of my stats seem a bit off.

First the number of visits (and unique visitors as well) significantly dropped, but the number of pageviews kept the same.
[attachment 1914 visits-pageviews.png]

The average time on page graph shows a very different line than before the switch to https. And the values shown do not correspond to the values shown in the table overiew under Actions - Pages:
[attachment 1916 average-time-on-page.png]

Any thoughts on what could be causing this?

(Stefan Giehl) #2

Is your Piwik hosted on HTTPS aswell? Otherwise there might be some security issues with mixed protocols that might avoid tracking


Thanks for your reply SteveG.

Yup, Piwik is both reachable under HTTP and HTTPS.

I’m using the piwik.php proxy script for tracking (, this might be of some influence:

Today I tracked with the regular tracking code and this produced a different result. The number of visitors stayed more or less the same compared to the previous days, but the number of pageviews dropped. Pageviews are now more in line with what I would expect from the number of visitors that were tracked today.

However, the average time on page data is still looking messed up. If the average time on a page is below a minute (as shown in the table view under actions - pages) the graph view shows the same time on page as the table. If the average time on a page is more than a minute, the graph shows a different value (only a few secs instead of more than a minute). See the second picture of my first post.

Todays results aside, I noticed that in the piwik.php script file on line 67 the first value of the array seems a hardcoded HTTP, but I do not understand the code good enough to know of this could be causing trouble when tracking HTTPS or that it is a variable after all.