added entree page tracking, added title to ajax response for tracking (production, agenda, search)
This commit is contained in:
@@ -79,6 +79,18 @@
|
||||
// };
|
||||
var state = getSysPathState(e.sys_path);
|
||||
history.pushState(state, null, e.url);
|
||||
|
||||
// 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', e.url]);
|
||||
_paq.push(['setDocumentTitle', e.title]);
|
||||
_paq.push(['trackPageView']);
|
||||
// js event
|
||||
// trackEvent(category, action, [name], [value])
|
||||
// _paq.push(['trackEvent', 'AjaxNav', 'loaded', state.url]);
|
||||
}
|
||||
}
|
||||
})
|
||||
.on('close_entree', function(e){
|
||||
|
||||
@@ -79,6 +79,18 @@
|
||||
// };
|
||||
var state = getSysPathState(e.sys_path);
|
||||
history.pushState(state, null, e.url);
|
||||
|
||||
// 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', e.url]);
|
||||
_paq.push(['setDocumentTitle', e.title]);
|
||||
_paq.push(['trackPageView']);
|
||||
// js event
|
||||
// trackEvent(category, action, [name], [value])
|
||||
// _paq.push(['trackEvent', 'AjaxNav', 'loaded', state.url]);
|
||||
}
|
||||
}
|
||||
})
|
||||
.on('close_entree', function(e){
|
||||
|
||||
Reference in New Issue
Block a user