Piwik - Open Source Web Analytics
Move the JavaScript snippet from the head to the body and load the following script inside the <head>
.
COFFEESCRIPT$(document).on 'page:change', ->
if window._paq?
_paq.push ['trackPageView']
else if window.piwikTracker?
piwikTracker.trackPageview()
Also, you will probably want to include the following code after var _paq = _paq || [];
to the body snippet so tracked title and url are updated accordingly:
JAVASCRIPT_paq.push(['setCustomUrl', document.location]);
_paq.push(['setDocumentTitle', document.title]);
Contributors
All solutions should be considered unofficial. There is no guarantee that a given solution will work with your application. If you find that a solution is insufficient, please let me know by submitting an issue on Github.