This transformation sets the last octet of an IP address to zero (e.g., 12.214.31.144 → 12.214.31.0), protecting user privacy and reducing disclosure risk.
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": "IP Anonymization","inputs": {},"enabled": true,"template_id": "template-ip-anonymization"}'