Matomo web component
3 unresolved threads
3 unresolved threads
Move Matomo related initialization to its own web component. Use this web component in App-shell.
App-shell has two new parameters: matomo-url
and matomo-site-id
. These are required for tracking, but tracking is still optional.
Merge request reports
Activity
added Feature label
- packages/matomo/.gitmodules 0 → 100644
- packages/matomo/src/matomo.js 0 → 100644
41 } 42 43 setupMatomo(loggedIn) { 44 if (loggedIn && ! this.isRunning) { 45 if (this.siteId === -1) { 46 console.log('site id missing, skipping matomo...'); 47 return; 48 } 49 if (this.endpoint === '') { 50 console.log('endpoint missing, skipping matomo...'); 51 return; 52 } 53 console.log('add matomo...'); 54 55 window._paq = window._paq || []; 56 _paq.push(['setCustomVariable', 1, "GitCommit", "<%= buildInfo.info %>", "visit"]); changed this line in version 3 of the diff
- packages/matomo/src/matomo.js 0 → 100644
100 return; 101 } 102 if (! loggedIn && this.isRunning) { 103 // TODO: reomve those event listeners 104 console.log('remove matomo...'); 105 this.isRunning = false; 106 } 107 } 108 109 track (action, message) { 110 console.log('MatomoElement (' + this.isRunning + '): ' + action + ', ' + message); 111 const event = ['trackEvent', action, message]; 112 if (this.isRunning) { 113 _paq.push(event); 114 } else { 115 this.lastEvent = event; mentioned in commit bac4b031
I will accept the merge request so @19320D286FE1E97C can work on the integration.
mentioned in commit 9dc05ecd
Please register or sign in to reply