Title: [Plugin: WP-HTML-Compression] HTML Replacement not working with Piwik Analytics
Last modified: August 20, 2016

---

# [Plugin: WP-HTML-Compression] HTML Replacement not working with Piwik Analytics

 *  Resolved [elmll](https://wordpress.org/support/users/elmll/)
 * (@elmll)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-html-replacement-not-working-with-piwik-analytics/)
 * Hey,
 * this plugin does not work if you have a Piwik[1] tracking code on your website.
   The inline javascript line that breaks this plugin looks like this:
 * `document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/
   javascript'%3E%3C/script%3E"));`
 * After the plugin minified the html this line look like this:
 * `document.write(unescape("%3Cscript src="/"%20+%20pkBaseURL%20+%20"piwik.js" 
   type='text/javascript'%3E%3C/script%3E"));`
 * This is not valid javascript, and breaks all the javascript execution on the 
   website.
 * The problem might be the absolute-to-relative plugin but I’m not sure on that.
 * [1] [http://piwik.org/](http://piwik.org/)
 * [http://wordpress.org/extend/plugins/wp-html-compression/](http://wordpress.org/extend/plugins/wp-html-compression/)

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

 *  [Pothi Kalimuthu](https://wordpress.org/support/users/pothi/)
 * (@pothi)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-html-replacement-not-working-with-piwik-analytics/#post-2826466)
 * > The problem might be the absolute-to-relative plugin but I’m not sure on that.
 * It is indeed due to shortening of URL. By changing the value of `shorten_urls`
   from _true_ to _false_, I’ve fixed this Piwik related issue.
 * Hope this helps you too!
 *  Plugin Author [Steven Vachon](https://wordpress.org/support/users/prometh/)
 * (@prometh)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-html-replacement-not-working-with-piwik-analytics/#post-2826475)
 * Did you set `$compress_js` to `true`? JavasSript shouldn’t be getting compressed
   if using default settings. Either way, I’ve just released a new version of [Absolute-to-Relative-URLs](http://wordpress.org/extend/plugins/absolute-to-relative-urls/)
   which has this issue resolved. It will be integrated into this plugin very soon.

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

The topic ‘[Plugin: WP-HTML-Compression] HTML Replacement not working with Piwik
Analytics’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-html-compression.svg)
 * [WP-HTML-Compression](https://wordpress.org/plugins/wp-html-compression/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-html-compression/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-html-compression/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-html-compression/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-html-compression/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-html-compression/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Steven Vachon](https://wordpress.org/support/users/prometh/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-html-replacement-not-working-with-piwik-analytics/#post-2826475)
 * Status: resolved