Skip to content

Commit

Permalink
fix(backport): exclude utm_term from collection #154
Browse files Browse the repository at this point in the history
The utm_term is typically populated from search queries and can theoretically leak PII. So it's safest to exclude it from collection for now

Fix #153
  • Loading branch information
ramboz authored Apr 17, 2024
1 parent 98af562 commit 57d615b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ new PerformanceObserver((list) => {

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

0 comments on commit 57d615b

Please sign in to comment.