Skip to content

Add tests for pii redaction#186

Merged
sanason merged 1 commit intomasterfrom
more-automated-tests
Apr 6, 2026
Merged

Add tests for pii redaction#186
sanason merged 1 commit intomasterfrom
more-automated-tests

Conversation

@sanason
Copy link
Copy Markdown
Member

@sanason sanason commented Apr 6, 2026

A few integration tests for PII redaction, mostly testing that redaction is applied in the correct circumstances. These are not intended to fully exercise the redaction algorithms. Once these integration tests are in place, I'd like to refactor the redaction function so it can be unit tested and build a more complete unit test suite.

  • PII redaction is applied to the event parameters in a gtag('event', '<event_name>', {<event_params>}) call. Tests for email, SSN, phone number, DOB, and password redaction.
  • PII redaction is applied to the additional config info in a gtag('config', '<TARGET_ID>', {<additional_config_info>}) call.
  • PII redaction also applies to GA4 automatically collected events, which DAP implements by adding a PII-redacting wrapper to the window.navigator.sendBeacon call.

@sanason sanason merged commit 0678462 into master Apr 6, 2026
5 checks passed
@sanason sanason deleted the more-automated-tests branch April 29, 2026 13:22
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.

1 participant