Downsampler

Last updated:

|Edit this page

Note: We do not recommend using the downsampler to lower the number of events ingested by PostHog. Instead, we have guide you can use to capture fewer unwanted events.

This transformation enables you to reduce how many events a deployment of PostHog will ingest. This is especially useful for users who have huge volumes of data, but don't need to analyze it all and want to avoid large bills.

Requirements

Using this requires either PostHog Cloud with the data pipelines add-on, or a self-hosted PostHog instance running a recent version of the Docker image.

Installation

  1. In PostHog, click the "Data pipeline" tab in the left sidebar.
  2. Search for 'Downsampling' and select the transformation, press Install.
  3. Follow the on-screen steps to configure the transformation.

Configuration

OptionDescription
% of events to keep
Type: string
Required: False
Reduces events flowing in to the percentage value above
Sampling method
Type: choice
Required: False
Distinct ID aware sampling will sample based on distinct IDs, meaning that a user's events will all be ingested or all be dropped at a given sample percentage.

FAQ

Is the source code for this transformation available?

PostHog is open-source and so are all transformation on the platform. The source code for the Downsampler transformation is available on GitHub.

Who created this transformation?

We'd like to thank PostHog team members Michael Matloka and Marius Andra and Neil Kakkar for creating the Downsampler.

Who maintains this?

This is maintained by PostHog. If you have issues with it not functioning as intended, please let us know!

What if I have feedback on this destination?

We love feature requests and feedback. Please tell us what you think..

What if my question isn't answered above?

We love answering questions. Ask us anything via our community forum.

Questions?

Was this page useful?

Next article

Filter Out

This transformation enables you to create filters which prevent PostHog from ingesting data from your product unless it passes those filters. Any events which do not match the filter requirements are skipped over and are not ingested. Installation In PostHog, click the " Data pipeline " tab in the left sidebar. Search for 'Filter Out' and select the transformation, press Install. Follow the on-screen steps to configure the transformation. This transformation will only work on events ingested…

Read next article