Endless loop on 'trackPageView"

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.

Hi,

This might be related to

Hi Lukas,

Thank you for your quick reply.

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.

Any other ideas where the issue might lay?

Hi,

Are you using the HeatmapSessionRecording premium plugin?

Hi Lukas,

I don’t know, where can I see that?

I have just been given the task of implementing it in our Angular project, I haven’t setup the Matomo account

Hi,

Either check on https://plugins.matomo.org/premium if you bought the plugin or go into your Matomo admin settings and check the list of plugins.

Hi Lukas,

Yes, that is included in the package we bought

1 Like

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.

Thank you for your help