Title: http wordpress to https piwik
Last modified: August 21, 2016

---

# http wordpress to https piwik

 *  [picosam](https://wordpress.org/support/users/picosam/)
 * (@picosam)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/http-wordpress-to-https-piwik/)
 * Dear all,
 * I have wordpress hosted at [http://www.mydomain.com](http://www.mydomain.com)
   and piwik hosted at [https://piwik.mydomain.com](https://piwik.mydomain.com) 
   I noticed the following line in the tracking code script:
 * `var u=(("https:" == document.location.protocol) ? "https" : "http") + "://piwik.
   mydomain.com/"`
 * 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,
    Sammy
 * [http://wordpress.org/plugins/wp-piwik/](http://wordpress.org/plugins/wp-piwik/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/http-wordpress-to-https-piwik/#post-4292973)
 * 1.) Yes, the tracking code depends on the document’s protocol. If your page isn’t
   secured, why not also allow unsecured loading of the tracking code?
 * 2.) You should use a valid (=trusted) certificate if possible. You can disable
   SSL peer verification if you have no choice. Please also have a look at this 
   thread regarding SSL: [http://wordpress.org/support/topic/plugin-wp-piwik-https-ssl-support?replies=3](http://wordpress.org/support/topic/plugin-wp-piwik-https-ssl-support?replies=3)
 * 3.) If you don’t like to use the JavaScript tracking code and Piwik is running
   on the same server, you can track visitors by calling Piwik PHP classes instead
   of using JavaScript tracking. This will solve your SSL problem because the tracking
   code isn’t needed anymore. But this function is absolutely beta, so you have 
   to try on your own if its working as expected.

Viewing 1 replies (of 1 total)

The topic ‘http wordpress to https piwik’ is closed to new replies.

 * ![](https://ps.w.org/wp-piwik/assets/icon-256x256.png?rev=3529668)
 * [Connect Matomo - Analytics Dashboard for WordPress](https://wordpress.org/plugins/wp-piwik/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-piwik/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-piwik/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-piwik/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-piwik/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-piwik/reviews/)

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)

 * 1 reply
 * 2 participants
 * Last reply from: [braekling](https://wordpress.org/support/users/braekling/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/http-wordpress-to-https-piwik/#post-4292973)
 * Status: not resolved