Skip to content

Commit

Permalink
fix: exclude utm_term from collection
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
  • Loading branch information
ramboz authored Apr 17, 2024
1 parent 92883ef commit 545a168
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ function addUTMParametersTracking() {
const usp = new URLSearchParams(window.location.search);
[...usp.entries()]
.filter(([key]) => key.startsWith('utm_'))
.filter(([key]) => key !== 'utm_id')
// exclude keys that may leak PII
.filter(([key]) => key !== 'utm_id' && key !== 'utm_term')
.forEach(([source, target]) => sampleRUM('utm', { source, target }));
}

Expand Down

0 comments on commit 545a168

Please sign in to comment.