Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 750 Bytes

File metadata and controls

29 lines (23 loc) · 750 Bytes
title contributors
Piwik
user name
halfdan
Fabian Becker
user name
makkrnic
Mak Krnic

Piwik - Open Source Web Analytics

piwik.org

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]);