title | contributors | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Piwik |
|
Move the JavaScript snippet from the head to the body and load the following script inside the <head>
.
$(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:
_paq.push(['setCustomUrl', document.location]);
_paq.push(['setDocumentTitle', document.title]);