Remove reload action from report

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