Send PostHog conversion events to Meta Ads

Last updated:

|Edit this page

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.

You'll also need access to the relevant Meta Ads account.

Installation

  1. In PostHog, click the Data pipeline tab in the left sidebar.

  2. Click the Destinations tab.

  3. Search for Meta Ads Conversions and select the destination.

  4. Visit the Meta Events Manager.

    1. If you’ve already set up a Pixel for your website, we recommend that you use the same Pixel ID for your browser and server events.
      1. To create a new Pixel, click Connect data and select Web.
      2. For the connection method, select Set up manually and Conversions API.
    2. Go to your Pixel via Data sources.
    3. Switch to the Settings tab and your Pixel ID will be listed as Dataset ID.
    4. You can create an access token by clicking Generate access token.
  5. Back in PostHog, add the access token and Pixel ID to the destination configuration.

  6. Set up your event and property filters to remove unnecessary events. You only want to send events that are conversions. Filter out unrelated events or ones missing required data.

  7. Press Create & enable, test your destination, and then watch your conversions get sent to Meta Ads.

Configuration

OptionDescription
Access token
Type: string
Required: True
Check out this page on how to obtain such a token: https://developers.facebook.com/docs/marketing-api/conversions-api/get-started
Pixel ID
Type: string
Required: True
You must obtain a Pixel ID to use the Conversions API. If you’ve already set up a Pixel for your website, we recommend that you use the same Pixel ID for your browser and server events.
Event name
Type: string
Required: True
A standard event or custom event name.
Event time
Type: string
Required: True
A Unix timestamp in seconds indicating when the actual event occurred. You must send this date in GMT time zone.
Action source
Type: choice
Required: True
This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people.
User data
Type: dictionary
Required: True
A map that contains customer information data. See this page for options: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters
Custom data
Type: dictionary
Required: True
A map that contains custom data. See this page for options: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data

FAQ

Is the source code for this destination available?

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

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? Ask Max AI.

It's easier than reading through 560 docs articles.

Community questions

Was this page useful?

Next article

Send PostHog event data to RudderStack

You'll also need access to the relevant RudderStack account. Installation In PostHog, click the " Data pipeline " tab in the left sidebar. Click the 'Destinations' tab. Search for 'RudderStack' and select the destination. Add your RudderStack Write API Key at the configuration step. Press 'Create & Enable' and watch your 'Events' get sent to RudderStack! Configuration FAQ Is the source code for this destination available? PostHog is open-source and so are all the destination on the platform. The…

Read next article