This transformation hashes sensitive personal data (PII) like email, phone numbers, etc. using SHA-256 to protect user privacy.
Configuration
Option | Description |
---|---|
Properties to Hash Type: string Required: True | Comma-separated list of property paths to hash (e.g. "$ip,$email,$set.$phone") |
Hash Distinct ID Type: boolean Required: False | Whether to hash the distinct_id field |
Salt Type: string Required: False | Optional salt to add to the hashed values for additional security |
Using our REST API you can create this transformation like so:
Terminal
# Create a new destinationcurl --location 'https://us.i.posthog.com/api/environments/:project_id/hog_functions' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer <POSTHOG_PERSONAL_API_KEY>' \--data '{"type": "transformation","name": "PII Data Hashing","inputs": {"propertiesToHash": {"value": ""}},"enabled": true,"template_id": "template-pii-hashing"}'