Send PostHog conversion events to TikTok 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 TikTok Ads account.

Installation

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

  2. Click the Destinations tab.

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

  4. Visit the TikTok Events Manager.

    1. If you’ve already set up a Pixel for your website, we recommend that you use the same Pixel for your browser and server events.
      1. To create a new Pixel, click Connect data source and select Web.
      2. Skip the Add your website step.
      3. For the connection method, select Manual setup and Events API.
      4. Enter a name for your Pixel and click Create.
    2. Go to your Pixel via Data sources.
    3. Switch to the Settings tab and your Pixel ID will be listed as ID.
    4. You can create an access token by clicking Generate Access Token.
  5. Back in PostHog, add the Pixel ID and Access token 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 TikTok Ads.

Configuration

OptionDescription
Access token
Type: string
Required: True

Check out this page on how to obtain such a token: https://business-api.tiktok.com/portal/docs?id=1771101027431425

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 ID
Type: string
Required: True

The ID of the event.

Event timestamp
Type: string
Required: True

A Unix timestamp in seconds indicating when the actual event occurred.

User properties
Type: dictionary
Required: True

A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-user%20parameters

Property properties
Type: dictionary
Required: True

A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-properties%20parameters

Page properties
Type: dictionary
Required: True

A map that contains page information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-page%20parameters

Test Event Code
Type: string
Required: False

Use this field to specify that events should be test events rather than actual traffic. You'll want to remove your Test Event Code when sending real traffic through this integration.

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 616 docs articles.

Community questions

Was this page useful?

Next article

Send SMS messages using Twilio from analytics events

You can use your PostHog event data to send SMS messages via Twilio. Here's everything you need to get started. Configuring Twilio First, you'll need to create a Twilio account if you don't have one already. Then, gather the following credentials from your Twilio dashboard: Account SID : Found on your Twilio Console Dashboard Auth Token : Found on your Twilio Console Dashboard From Phone Number : This is the Twilio phone number you'll be sending messages from. You can find or purchase one in…

Read next article