I have been trying to get Matomo to work in my angular project, and it seems to be doing everything right at first, triggering trackPageView and delivering the information to our matomo overview, but when I change page and it calls trackPageView again, the script never terminates, and I can’t figure out why.
In the amtomo.min.js it reaches “push: af ()” and never gets any further.
I am using angular 6 and ngx-matomo 0.1.4.
I am having the same issue when I try accessing window[’_paq’] directly instead of going through ngx-matomo
Please let me know which other information you might need to help troubleshoot this issue.
I have tried not using ngx-matomo and pushing the values directly to window[’_paq’], and then pushing these two:
window[’_paq’].push([‘HeatmapSessionRecording::disableAutoDetectNewPageView’]);
window[’_paq’].push([‘HeatmapSessionRecording::setNewPageView’, true]);
and I am still getting the same issue, no matter where I put them it seems.
To trigger on a page change I add the push to router.events > (event instanceof NavigationEnd) in app.component.
I just tried completely disabling Heatmap window[’_paq’].push([‘HeatmapSessionRecording::disable’]); and using trackPageView, and that works, it will correctly mark the page with the time spend on the page, so there is definitely soemthing about the HeatMap I can’t figure out how to use, but at least I found a way to register the page changes.