Bouncers (1 Action only) have no avg time on page

Hello everyone,

I just noticed that all visitors that bounced have no avg. time on page. The time counter only starts after 2 actions.

That seems wrong to me as surely not all of those visitors bounce immediately - many of them probably read some text on the page, get what they want and then bounce back to google.

Can someone please explain it to me?

Thanks
Ru So

Not really by “after 2 actions”. One-Page-Visits have default no “Time on Page”, because an “action” is missing. An “action” is default a link click (next page), when link click tracking is activated.

_paq.push(['enableLinkTracking']);

For hidden “actions” detecting, there is the heartbeattimer, but that is not an interval since shes function was changed for 2 years. It detect page leave and similar. It has a timeout, also starts after x seconds. The minimum is 5 seconds.

_paq.push(['enableHeartBeatTimer', 5]);

Further you can use the matomo ping with own functions like this:

window.addEventListener('beforeunload', function(e) {
  _paq.push(['ping']);
});

or for a real heartbeat interval for the first 11 seconds.

var matomoheartbeat = setInterval(function() {
  _paq.push(['ping']);
}, 1000);
setTimeout(function() {
  clearInterval(matomoheartbeat);
}, 11000);

all after/below _paq.push(['trackPageView']);

_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['enableHeartBeatTimer', 5]);
window.addEventListener('beforeunload', function(e) {
  _paq.push(['ping']);
});
var matomoheartbeat = setInterval(function() {
  _paq.push(['ping']);
}, 1000);
setTimeout(function() {
  clearInterval(matomoheartbeat);
}, 11000);

apart from that, it is possible, that the devices / browsers / browser plugins on the viewer-side block the tracking in details. In my matomo i have every time few visits without pagename or completly without time on page (not even 0 seconds).

1 Like

You’d need a second page to be able to measure time spent on a page (if you dont do a work a round matomo tag manager)

Hey Melbao, thanks a lot for your detailled answer! I forwared it to our developer and he’ll integrate the code!

Danke :slight_smile:

Hey Björn, does your answer add to what melbao said? Or are you saying that the time will only be count if a user clicks on a second page?
Cheers

Sorry, no - missed his answer