Skip to content

Commit

Permalink
refactor: address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ramboz committed Mar 22, 2024
1 parent 34c4f90 commit c6e2491
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ const observer = new PerformanceObserver((list) => {
observer.observe({ type: 'resource', buffered: true });

const usp = new URLSearchParams(window.location.search);
const utmParams = [...usp.entries()]
[...usp.entries()]
.filter(([key]) => key.startsWith('utm_'))
.filter(([key]) => key !== 'utm_id');
utmParams.forEach(([key, value]) => {
sampleRUM('utm', { source: key, target: value });
});
.filter(([key]) => key !== 'utm_id')
.forEach(([key, value]) => {
sampleRUM('utm', { source: key, target: value });
});

0 comments on commit c6e2491

Please sign in to comment.