Http wordpress to https piwik

Dear all,

I have wordpress hosted at and piwik hosted at I noticed the following line in the tracking code script:

var u=((“https:” == document.location.protocol) ? “https” : “http”) + “://”

  1. Does this mean that the URL generated will always be http and not https, since the document URL is http? If so, how may I change that, since so far I have 0 hits on piwik, as if no one has ever accessed my blog.

  2. My SSL certificated is not trusted, will that cause a problem for wp-piwik plugin when it tries accessing the API?

  3. What’s Piwik path (PHP API, beta) for? Should I use it at all?

Thanks in advance,

The default Piwik javascript tracking code will work for both http and https versions of the site. However, the default image tracking code will be blocked in some browsers when the version of the site being accessed is the other version from the tracking code (e.g. accessing https site and using http tracking code). The image issue can be fixed by changing the code from absolute web location (http://…) to the relative location of the tracking code (e.g. /piwik/piwik.php…)

The only issue with ‘untrusted’ certificates is with browsers and some other clients, such as email clients. The API will not care about the status or presence of a CA. That being said, you can get free recognized certificates from StartSSL.

I gave up using the WP-Piwik plugin in favor of WP Analytics Tracking. What I like about WP Analytics Tracking is that I simply copy and paste the code as I like it in the blank field. This works fine for me with tracking through Piwik, though if you are seeking to view analytics data within the WordPress dashboard, this will not be available with this plugin.