Remove reload action from report

HI
I find several visits (especially those coming from campaigns) with only the reload action of the landing page, this alters the data on the duration of the session and the bounce rate. Is there a way to remove reload actions from the reports? Possibly not permanently?

PS.
Alternatively, how would you create a segment to include users who have visited at least 2 different pages?

Your initial question is not so easy to solve. Because the tracking after reloading are deactivated. An afterwards deleting of tracking is not possible, respectivelly only with a database cleaning. Matomo don’t collect the tracking data and send it at a later time. It’s live tracking.

Deactivate the tracking on a page after reload page:
embeed the _paq.push(['trackPageView']); in a if rule.

if ((("performance" in window) === true) && window.performance.navigation.type === 0) {
  _paq.push(['trackPageView']); // enable tracking only on pages without reload
}

The initial value of type is 0. This value is setted after a page reload to 1.

Consider, older browsers don’t have this function. With this no tracking is activated on all pages. For this here is an alternative solution:

if (("performance" in window) === false) {
  _paq.push(['trackPageView']); // enable tracking if the function is missing
} else {
  if (window.performance.navigation.type === 0) {
    _paq.push(['trackPageView']); // enable tracking only on pages without reload
  }
}
3 Likes

i @melbao, @Lotar
I did not know window.performance. Very interesting… But deprecated:

I think you can use performance.getEntriesByType('navigation') instead (a little more complex to implement…::thinking:):

The API:

2 Likes

Update about Philippes infos.

if ((window.performance.getEntriesByType("navigation")[0] != undefined) && (window.performance.getEntriesByType("navigation")[0].type != 'reload')) {
  _paq.push(['trackPageView']); // enable tracking only on pages without reload
}

or

if (window.performance.getEntriesByType("navigation")[0] == undefined) {
  _paq.push(['trackPageView']); // enable tracking if the data is missing
} else {
  if (window.performance.getEntriesByType("navigation")[0].type != 'reload') {
    _paq.push(['trackPageView']); // enable tracking only on pages without reload
  }
}
2 Likes

thanks to all… nice ideas… i will test it on a demo site

New informations about that matter with the tracking of reloaded pages as regular page visits are available.

Mobile devices browser reload a webpage every time when the user swipe the webpage over the top or bottom. This feature is default activated and can be deactivated in the settings under Customize → Gestures → Pull to refresh

@heurteph-ei
This default activated Pull to refresh feature is a big problem in tracking. So, matomo should be included by default a solution like above.