Privacy & Masking
Signal JS automatically protects sensitive data at multiple levels with built-in privacy controls.DOM Element Masking
Use CSS classes or data attributes to control what gets recorded:Input Field Masking
By default, input values are not masked (except passwords). SetmaskAllInputs: true to mask all inputs, or configure per input type:
Automatic Sensitive Data Detection
The SDK automatically detects and masks common sensitive data patterns:| Data Type | Pattern | Masked As |
|---|---|---|
| Credit Cards | 4111 1111 1111 1111 | ****-****-****-**** |
| SSN | 123-45-6789 | ***-**-**** |
| Emails | user@example.com | ***@example.com |
| API Keys | sk_live_abc123… | sk_live_***REDACTED*** |
| JWT Tokens | eyJhbG… | Bearer ***TOKEN*** |
| Passwords | (in objects) | ***MASKED*** |
Console Log Masking
Sensitive data in console logs is automatically masked:Network Body Masking
Request and response bodies are automatically sanitized:Programmatic Control
Control recording programmatically:Network Request Masking
Customize network request masking:Best Practices
- Use CSS classes for static elements that should always be masked
- Use data attributes for dynamic content or when CSS classes aren’t feasible
- Enable automatic masking for inputs by setting
maskAllInputs: true(default isfalse) - Configure sensitive headers to always redact authentication tokens
- Use custom masking functions for complex scenarios
- Test your masking to ensure sensitive data is properly protected
