Piwik does not track SSL https sites

I tried to find this topic in the forums but I cannot find it, while I am sure it is here somewhere. One of my sites now has https:// for secure logins but piwik is not tracking visitors. The only way I can get it to track is if i use the following “Image Tracking Link” but then it just tells me that a visitor came and nothing else. What do I need to change so I can track the sites that I have https:// ssl secured.

Can anyone help with this. If it helps my piwik install is already ssl secured, which was the only thing I could find about this problem.

Issue resolved.

In my case I had to go back and change the install url of piwik from. http://piwik.mydomain.com/piwik to the correct format https://piwik.mydomain.com/piwik and now it is tracking again. Since I did the install of piwik using softaculous through cpanel I went to the all installations page then edit details and where it said URL I just made it https:// then clicked edit installation details, and there you have it problem resolved.

I have multiple sites using SSL and the only thing I did to get it to work was set the site as e-commerce.

I tried setting it as e-commerce but it did not work. In the end going back and changing http:// to https:// on the piwik install resolved the issue.

The only thing that I am really having a concern with is the fact that it does not track all browsers. Opera, safari and a few others are not getting tracked. Any suggestions anyone.

Opera & Safari should be tracked. Could you elaborate?

I already came up with a solution for this issue instead of keeping it on the primary and providing a dedicated ip to it. I created a new account in in WHM then installed piwik and migrated the files from the old install using phpMyAdmin export import. Then provided a dedi ip that way issue fix tracking system works.

I am thinking that protocol-less urls ( //example.com ) should solve everything related to this.
I haven’t tested yet with piwik, once I never had the OP’s issue, although I am testing piwik on both http and https urls on lan linux.
Maybe I never had this issue because I always use a subdomain without protocol, I am not sure I got to check.

I will report back any findings :smiley:

It is a subdomain


https://piwik.mydomain.com This domain was in the same account with sub1.mydomain.com
https://piwik.mydomain.com this site was assigned a dedicated ip changing scripts in cPanel but it did not solve the issue.

site to track
https://sub1.mydomain.com this is the tracked site

So what I did is create a new account on the main web server called piwik1.mydomain.com while setting up the account I assigned a dedicated ip to this new account.

Then I created a fresh install in cPanel using piwik1.mydomain.com account then copied the old files from the other accounts sub domain database to the new account for piwik1. From here I setup the new SSL certs for that dedicated ip after this I went back and set piwik to force SSL also went back to the softcalous and changed the install from http:// to https:// next i added the new javascript code to the site and there you have it tracking is working with all browsers issue resovled.

If you force SSL on the pages and it works then you are fine.
If you do not force SSL and the visitor can choose, say by changing the url on his browser, in this case you got to check if it tracks both.

Hi! Where did you change “the install url of Piwik”?

Hi @Fredrikk

As this post is more than 4 year old, I wouldn’t guarantee that you’ll get an answer.

Can I help you instead? What is your issue?

1 Like

Yes, my Piwik doesn’t track my https pages. We changed our main web site to SSL a few weeks ago and since then I get no results from the pages. I tried to specify both http and https in the Piwik configuration for the site but with no results. I also tried to set the site as e-commerce. Should Piwik be changed in som other way? Should the tracking code be changed?

And, my Piwik doesn’t run on a https server. Yet. Does it have to, to be able to track https pages on the main web site?


This is a fundamental principle of HTTPS: No HTTPS site is allowed to include any source that isn’t transfered via HTTPS as it undermines the whole security. A malicious attacker could modify the HTTP content and as a result take over the “secure” Website.

Therefore Piwik needs to be served via HTTPS if any website that are tracked are running via HTTPS.


Thats´s it! Thanks! Then we’ll get our Piwik on SSL as soon as possible.