Support » Plugin: Piwik Analytics » [Plugin: Piwik Analytics] htmlencoded track.code makes browser render to screen

  • Using WP v3.0.4 and Piwik v. 1.1.1

    In my installation, the wp-piwik plugin stores the tracking code in the DB
    (wp_options -> wp-piwik_jscode) in htmlencoded format. Like this:
    & lt ;!-- Piwik --& gt; & lt;script type=& quot;text/j...

    The string is never decoded before output, so instead of working as a javascript, it is rendered to the browser screen.

    I fixed this by simply changing line the file wp-piwik.php line 97:
    from:
    if ($bolDisplay) echo $strJSCode;
    to:
    if ($bolDisplay) echo html_entity_decode($strJSCode);

Viewing 1 replies (of 1 total)
  • Are you using Piwik Analytics or WP Piwik*? The latter is updated for WP3.0.X and Piwik 1.1.1 support, and also addressed the entity encoding issues (and has been very recently updated for compatibility with the current Piwik 1.1 and its subsequent 1.1.1 bug fix release)

    *I’m almost certain you’re using Piwik Analytics as in the topic tag here you put Piwik Analytics, and the code you’re referencing isn’t found on line 97… So that’s why I suggest using WP-Piwik instead. Try it, if you don’t have it.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Piwik Analytics] htmlencoded track.code makes browser render to screen’ is closed to new replies.