Title: Force SSL in tracker code
Last modified: August 21, 2016

---

# Force SSL in tracker code

 *  Resolved [Stanislav Khromov](https://wordpress.org/support/users/khromov/)
 * (@khromov)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/force-ssl-in-tracker-code/)
 * Would it be possible to create an option that would force WP-Piwik to always 
   use SSL when sending data in the tracking script?
 * Thanks!
 * [https://wordpress.org/plugins/wp-piwik/](https://wordpress.org/plugins/wp-piwik/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/force-ssl-in-tracker-code/#post-5012103)
 * This is quite easy and can be done with one of the next releases.
 * As a _workaround_, got to line 224
 * `echo $strTrackingCode;`
    and add this line BEFORE:
 * `$strTrackingCode = str_replace('(("https:" == document.location.protocol) ? "
   https" : "http")','"https"',$strTrackingCode);`
 * But just to understand your request: does it make sense to deliver the tracking
   code secured while the page itself isn’t?
 *  Thread Starter [Stanislav Khromov](https://wordpress.org/support/users/khromov/)
 * (@khromov)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/force-ssl-in-tracker-code/#post-5012104)
 * Sounds good!
 * I just want to enable force_ssl=1 on my Piwik install.
    [http://piwik.org/faq/how-to/faq_91/](http://piwik.org/faq/how-to/faq_91/)
 * It’s easiest to run everything under HTTPS. (You don’t need to setup multiple
   vhosts for example.)
 * The demand for this feature will probably increase as people adapt SPDY where
   SSL is forced.
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/force-ssl-in-tracker-code/#post-5012105)
 * Ah, ok, I understand the benefit – thank you. 🙂
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/force-ssl-in-tracker-code/#post-5012162)
 * The feature will be part of 1.0. A first release candidate is scheduled for the
   end of July.
 *  Thread Starter [Stanislav Khromov](https://wordpress.org/support/users/khromov/)
 * (@khromov)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/force-ssl-in-tracker-code/#post-5012163)
 * Yay!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Force SSL in tracker code’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [Stanislav Khromov](https://wordpress.org/support/users/khromov/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/force-ssl-in-tracker-code/#post-5012163)
 * Status: resolved