Piwik Analytics
htmlencoded track.code makes browser render to screen (2 posts)

  1. Mikkel Breum
    Posted 4 years ago #

    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:
    if ($bolDisplay) echo $strJSCode;
    if ($bolDisplay) echo html_entity_decode($strJSCode);

  2. Alvaro Degives-Mas
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Piwik Analytics
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic