Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add the ability to mask some PII-containing URL parameters #1654

Merged
merged 8 commits into from
Jan 16, 2025

Conversation

robbie-c
Copy link
Member

@robbie-c robbie-c commented Jan 15, 2025

Changes

Add a config option to mask URL parameters. This will also mask any properties that are derived from them.

Why: We want to add a cookieless mode, allowing users to be tracked before consent is given. To do this, we need to not capture any PII-containing properties (such as ad IDs like gclid), as consent would be needed for those.

Checklist

  • Tests for new code (see advice on the tests we use)
  • Accounted for the impact of any changes across different browsers
  • Accounted for backwards compatibility of any changes (no breaking changes in posthog-js!)

Copy link

vercel bot commented Jan 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Jan 16, 2025 4:47pm

Copy link

github-actions bot commented Jan 15, 2025

Size Change: +16.2 kB (+0.5%)

Total Size: 3.24 MB

Filename Size Change
dist/array.full.es5.js 265 kB +1.51 kB (+0.57%)
dist/array.full.js 367 kB +1.51 kB (+0.41%)
dist/array.full.no-external.js 366 kB +1.51 kB (+0.41%)
dist/array.js 181 kB +1.5 kB (+0.84%)
dist/array.no-external.js 179 kB +1.51 kB (+0.85%)
dist/customizations.full.js 13.8 kB +1.17 kB (+9.28%) 🔍
dist/main.js 182 kB +1.5 kB (+0.84%)
dist/module.full.js 367 kB +1.51 kB (+0.41%)
dist/module.full.no-external.js 366 kB +1.51 kB (+0.41%)
dist/module.js 181 kB +1.5 kB (+0.84%)
dist/module.no-external.js 180 kB +1.5 kB (+0.84%)
ℹ️ View Unchanged
Filename Size
dist/all-external-dependencies.js 207 kB
dist/dead-clicks-autocapture.js 14.4 kB
dist/exception-autocapture.js 9.48 kB
dist/external-scripts-loader.js 2.64 kB
dist/recorder-v2.js 115 kB
dist/recorder.js 115 kB
dist/surveys-preview.js 58.1 kB
dist/surveys.js 63.8 kB
dist/tracing-headers.js 1.76 kB
dist/web-vitals.js 10.4 kB

compressed-size-action

@robbie-c robbie-c force-pushed the feat/add-option-to-mask-pii-url-properties branch from 05c7b6f to 1062acd Compare January 16, 2025 16:00
@robbie-c robbie-c requested a review from daibhin January 16, 2025 16:34
@robbie-c robbie-c marked this pull request as ready for review January 16, 2025 16:39
@robbie-c robbie-c merged commit e0c4ba4 into main Jan 16, 2025
28 checks passed
@robbie-c robbie-c deleted the feat/add-option-to-mask-pii-url-properties branch January 16, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants