added matomo route tracking
This commit is contained in:
@@ -27,6 +27,15 @@ var Layout = {
|
||||
view(vn){
|
||||
// console.log('Layout view : lang', vn.attrs.lang);
|
||||
_i18n.setLang(vn.attrs.lang);
|
||||
console.log('Layout view : path', m.route.get());
|
||||
// matomo
|
||||
// https://matomo.org/blog/2017/02/how-to-track-single-page-websites-using-piwik-analytics/
|
||||
if(typeof _paq !== 'undefined'){
|
||||
_paq.push(['setCustomUrl', m.route.get()]);
|
||||
// _paq.push(['setDocumentTitle', e.title]);
|
||||
_paq.push(['trackPageView']);
|
||||
}
|
||||
|
||||
return [
|
||||
m(_Header, vn.attrs),
|
||||
vn.children,
|
||||
|
||||
Reference in New Issue
Block a user