added entree page tracking, added title to ajax response for tracking (production, agenda, search)

This commit is contained in:
2018-04-18 10:29:46 +02:00
parent 65d95036c0
commit f7225cdd01
7 changed files with 62 additions and 5 deletions
@@ -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){