I work on a Single Page App / Website, where we track our Data onto one server, but with multiple siteIds and enabled HeartBeat.
We took this approach to be able to track both, the App overall and additional specific routes (with customVariables). Convenient for our analysis of the data in a later step.
We are now facing a Problems with our approach on Page changes. We start more and more Trackers with enabled HeartBeart and cannot stop/remove the ones from previous pages, until we reload the page in the Browser. It can lead to a long list of pings the Client sends each x seconds.
We would like to be able to stop/disable the heartbeat on one or more of the obsolete Trackers by their siteId. I think the method disableHeartBeatTimer could help, but it's Debug only.
Maybe I just missed something and you can point me towards a possibility prevent the above behaviour. I would like to fix the Problem without changing our whole approach.
By looking at the code
enableHeartBeatTimer should enable a heart beat timer only once per tracker/website but not add more on page changes. Are you doing anything special on page change?
Are you using
_paq.push to track or
A workaround to disable a tracker would be currently to set something like
disableHeartBeatTimer should definitely be exposed as it may be useful in general to have it eg if you want to disable heart beat again on a certain page.