This transformation hashes sensitive personal data (PII) like email, phone numbers, etc. using SHA-256 to protect user privacy.
Configuration
| Option | Description | 
|---|---|
Properties to HashType: string Required: True  | Comma-separated list of property paths to hash (e.g. "$ip,$email,$set.$phone")  | 
Hash Distinct IDType: boolean Required: False  | Whether to hash the distinct_id field  | 
SaltType: 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"}'
