Downsample

Downsample

Reduces event volume coming into PostHog

Configuration

OptionDescription
% of events to keep
Type: string
Required: False
Sampling method
Type: choice
Required: False
Triggering events
Type: string
Required: False

A comma-separated list of PostHog events you want to downsample (e.g.: '$identify,mycustomevent'). If empty, all events will be downsampled.

Using our REST API you can create this transformation like so:

Terminal
# Create a new destination
curl --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": "Downsample",
"inputs": {},
"enabled": true,
"template_id": "plugin-downsampling-plugin"
}'