Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Updated Piwik script
Hello!
I have edited the code in .../Piwik/class.piwik.plugin.php
to conform to the new tracking code provided by the Piwik package.
Old code (starting at line 65):
<!-- Piwik --> <script type="text/javascript"> var _paq = _paq || []; _paq.push(["trackPageView"]); _paq.push(["enableLinkTracking"]); (function() { var u=(("https:" == document.location.protocol) ? "https" : "http") + "$PiwikInstall"; _paq.push(["setTrackerUrl", u+"piwik.php"]); _paq.push(["setSiteId", "$PiwikSiteID"]); var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript"; g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s); })(); </script> <noscript> <!-- Piwik Image Tracker --> <img src="$ImageTrack/piwik.php?idsite=$PiwikSiteID&rec=1" style="border:0" alt="" /> <!-- End Piwik --> </noscript> <!-- End Piwik Code -->
New code:
<!-- Piwik --> <script type="text/javascript"> var _paq = _paq || []; _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="$PiwikInstall"; _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setSiteId', '$PiwikSiteID']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); })(); </script> <noscript> <!-- Piwik Image Tracker --> <img src="$ImageTrack/piwik.php?idsite=$PiwikSiteID" style="border:0" alt="" /> <!-- End Piwik --> </noscript> <!-- End Piwik Code -->
For this to work properly, line 33 should be changed to:
'Plugins.Piwik.PiwikInstall' => array('LabelCode' => 'PiwikInstall', 'Control' => 'TextBox', 'Default' => C('Plugins.Piwik.PiwikInstall', '//www.example.com/piwik/')),
And anyone changing this on a board with the plugin enabled should change the 'PiwikInstall' setting to //www.example.com/piwik/ (leave out the http or https).
Tagged:
4
Comments
https://www.youtube.com/watch?v=2VyzII09Hos&t=5
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
I will update this when I have a chance. Thanks for the code suggestion @openletter
https://github.com/adrianspeyer/VanExtend/commit/639ea8ebe4a30323c1f613cddaedb9fc55ac7475