You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I'm just missing something obvious, but in that case I hope this ticket can lead to a documentation fix.
I'm trying to enable heart beat timer. Here's the script I've added to the top of my page:
<scripttype="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableHeartBeatTimer', 10]);
_paq.push(['enableLinkTracking']);
(function() {varu=<?=json_encode($this->piwikUrl) ?>;_paq.push(['setTrackerUrl',u+'piwik.php']);_paq.push(['setSiteId','1']);vard=document,g=d.createElement('script'),s=d.getElementsByTagName('script')[0];g.type='text/javascript';g.async=true;g.defer=true;g.src=u+'piwik.js';s.parentNode.insertBefore(g,s);})();</script>
I was under the impression that the heart beat timer would send an xhr request every 10 seconds, but after opening the page and keeping it open for >30 seconds no additional requests have been made, besides the normal page tracking request.
Is this a bug, a misconfiguration or a misunderstanding? I'm using Piwik 3.0.4.
The text was updated successfully, but these errors were encountered:
larsnystrom
changed the title
HeartBeatTimer does not work
How do HeartBeatTimer work?
Jun 20, 2017
Ah, that was it! Thank you! Could we possibly add a note of some sort to the documentation, like:
Note: When testing the heart beat timer, remember to make sure the browser tab has focus and not e.g. dev tools.
Of course, one could infer this from the current documentation, but I think explicitly mentioning dev tools could help others like me. I'll create a PR. You can reject it if you just think I'm stupid.
Maybe I'm just missing something obvious, but in that case I hope this ticket can lead to a documentation fix.
I'm trying to enable heart beat timer. Here's the script I've added to the top of my page:
I was under the impression that the heart beat timer would send an xhr request every 10 seconds, but after opening the page and keeping it open for >30 seconds no additional requests have been made, besides the normal page tracking request.
Is this a bug, a misconfiguration or a misunderstanding? I'm using Piwik 3.0.4.
The text was updated successfully, but these errors were encountered: