Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5981

Heartbeat Timer tracks when tab is minimized

$
0
0

Hi there!

I’ve enabled the Heartbeat Timer for one of our websites so it pings every 15 seconds. I installed the following code via the Matomo Tag Manager with the custom html feature.

<script type="text/javascript">

 setInterval(function () {
 window._paq = window._paq || [];
 window._paq.push(['ping'])
  }, 15000);

 </script>

When I tested it in the realtime dashboard it worked fine. The only problem is the pinging continues even if the tab is not in focus or the whole browser is minimized which leads to highly inaccurate visit durations.
As far as I understand, the heartbeat timer is only supposed to ping when the tab is active and in focus. Did I get that wrong or is my implementation somehow wrong? Does anyone have the same problem?

Thanks in Advance!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5981

Trending Articles