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

  • Resolved elmll

    (@elmll)


    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://wordpress.org/extend/plugins/wp-html-compression/

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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

    (@prometh)

    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 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.