Change the HeartBeat time?

How can i change the HeartBeat time in a already set _paq.push(['enableHeartBeatTimer', 10]); to _paq.push(['enableHeartBeatTimer', 60]); during a page view?

Hi @melbao
What happens if you execute _paq.push(['enableHeartBeatTimer', 60]); after _paq.push(['enableHeartBeatTimer', 60]);?

There is also something that works well:
_paq.push(['ping']); → This will ping Matomo. Then you could manage the ping yourself by code (via setInterval())

Hi Philippe, that’s a great mistake, that the HeartBeatTimer is equal to a setInterval - it is not.

My question was more like a “update” of the time value.

var seconds = 10;
_paq.push(['enableHeartBeatTimer', seconds]);
// ...
seconds = 60;
_paq.push(['enableHeartBeatTimer', seconds]);

But my question is founded at a mistake of understanding the HeartBeatTimer. More about my HeartBeatTimer question in my Github Issue: https://github.com/matomo-org/matomo/issues/20225