added better page tracking for piwik
This commit is contained in:
@@ -302,6 +302,12 @@
|
||||
|
||||
// piwik
|
||||
if(typeof _paq !== 'undefined'){
|
||||
// page tracking
|
||||
// https://matomo.org/blog/2017/02/how-to-track-single-page-websites-using-piwik-analytics/
|
||||
_paq.push(['setCustomUrl', state.url]);
|
||||
_paq.push(['setDocumentTitle', data.title]);
|
||||
_paq.push(['trackPageView']);
|
||||
// js event
|
||||
// trackEvent(category, action, [name], [value])
|
||||
_paq.push(['trackEvent', 'AjaxNav', 'loaded', state.url]);
|
||||
}
|
||||
|
||||
@@ -302,6 +302,12 @@
|
||||
|
||||
// piwik
|
||||
if(typeof _paq !== 'undefined'){
|
||||
// page tracking
|
||||
// https://matomo.org/blog/2017/02/how-to-track-single-page-websites-using-piwik-analytics/
|
||||
_paq.push(['setCustomUrl', state.url]);
|
||||
_paq.push(['setDocumentTitle', data.title]);
|
||||
_paq.push(['trackPageView']);
|
||||
// js event
|
||||
// trackEvent(category, action, [name], [value])
|
||||
_paq.push(['trackEvent', 'AjaxNav', 'loaded', state.url]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user