Skip to content

Commit

Permalink
Update modules/index.js
Browse files Browse the repository at this point in the history
Co-authored-by: Lars Trieloff <[email protected]>
  • Loading branch information
kptdobe and trieloff authored Dec 11, 2024
1 parent 50bd48c commit e4c23ca
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions modules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,16 @@ function addNavigationTracking() {

const processed = new Set(); // avoid processing duplicate types
new PerformanceObserver((list) => list
.getEntries().forEach((e) => {
if (!processed.has(e.type)) {
navigate(
window.hlx.referrer || document.referrer,
e.type,
e.redirectCount,
);
processed.add(e.type);
}
})).observe({ type: 'navigation', buffered: true });
.getEntries().filter(({type}) => !processed.has(type))
.map((e) => {
navigate(
window.hlx.referrer || document.referrer,
e.type,
e.redirectCount,
);
processed.add(e.type);
});
}).observe({ type: 'navigation', buffered: true });
}

function addLoadResourceTracking() {
Expand Down

0 comments on commit e4c23ca

Please sign in to comment.