diff options
author | Evan Prodromou <evan@status.net> | 2009-12-08 14:43:21 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-12-08 14:43:21 -0500 |
commit | 78fc9483d4d1fde4561905edf6594b86c4dc374e (patch) | |
tree | 7172cabba4c36bb3a7bd00a78ab09f1791a9a60c /plugins/PiwikAnalyticsPlugin.php | |
parent | 75b11527c7efb1d3d9c7d53b99d80480ce06a9f5 (diff) | |
parent | 3536f01258dc43bee764c98fbdda5a6f1df7bcb2 (diff) |
Merge branch '0.9.x' into testing
Diffstat (limited to 'plugins/PiwikAnalyticsPlugin.php')
-rw-r--r-- | plugins/PiwikAnalyticsPlugin.php | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/plugins/PiwikAnalyticsPlugin.php b/plugins/PiwikAnalyticsPlugin.php index 54faa0bdb..fefd09867 100644 --- a/plugins/PiwikAnalyticsPlugin.php +++ b/plugins/PiwikAnalyticsPlugin.php @@ -81,25 +81,20 @@ class PiwikAnalyticsPlugin extends Plugin function onEndShowScripts($action) { - $piwikCode = <<<ENDOFPIWIK - -<!-- Piwik --> -<script type="text/javascript"> + $piwikCode1 = <<<ENDOFPIWIK var pkBaseURL = (("https:" == document.location.protocol) ? "https://{$this->piwikroot}" : "http://{$this->piwikroot}"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); -</script> -<script type="text/javascript"> +ENDOFPIWIK; + $piwikCode2 = <<<ENDOFPIWIK try { var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", {$this->piwikId}); piwikTracker.trackPageView(); piwikTracker.enableLinkTracking(); } catch( err ) {} -</script> -<!-- End Piwik Tag --> - ENDOFPIWIK; - $action->raw($piwikCode); + $action->inlineScript($piwikCode1); + $action->inlineScript($piwikCode2); return true; } } |