added matomo route tracking
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -27,6 +27,15 @@ var Layout = {
|
|||||||
view(vn){
|
view(vn){
|
||||||
// console.log('Layout view : lang', vn.attrs.lang);
|
// console.log('Layout view : lang', vn.attrs.lang);
|
||||||
_i18n.setLang(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 [
|
return [
|
||||||
m(_Header, vn.attrs),
|
m(_Header, vn.attrs),
|
||||||
vn.children,
|
vn.children,
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ module.exports = {
|
|||||||
// },
|
// },
|
||||||
view(vn){
|
view(vn){
|
||||||
// console.log('_ModeText view', vn.attrs.lang);
|
// console.log('_ModeText view', vn.attrs.lang);
|
||||||
console.log('_dbs.active_type_filter : ', _dbs.active_type_filter);
|
// console.log('_dbs.active_type_filter : ', _dbs.active_type_filter);
|
||||||
return m('main', {id:"content", 'class':'mode-text'}, _dbs.data[vn.attrs.lang].map((p) => {
|
return m('main', {id:"content", 'class':'mode-text'}, _dbs.data[vn.attrs.lang].map((p) => {
|
||||||
// console.log("MAP _dbs", p);
|
// console.log("MAP _dbs", p);
|
||||||
p.lang = vn.attrs.lang;
|
p.lang = vn.attrs.lang;
|
||||||
|
|||||||
Reference in New Issue
Block a user