Skip to main content

TikTok Conversions API (CAPI)

Updated over 2 weeks ago

⭐ Available in the following bundle: Insights Bundle (incl. in Scale)

⭐ Available on the following plans: Agency, Business

👀 Not sure which plan you're on? Check your subscription here.

The TikTok Pixel is a convenient way to track users in your flow and leverage that data to optimize your ad campaigns. However, because the TikTok Pixel sends its data via the browser, it can often be blocked by ad blockers or firewalls, which lowers the accuracy of your tracking.

The TikTok Conversions API (CAPI) solves this issue by sending the same events through a server-to-server connection.


Setup

Step 1: Set up the Conversions API

  1. Go to your TikTok Ad Manager and navigate to the Events Manager. If you already have a Pixel, open the settings of your data source and click on Show Step-by-Step Guide under Events API to continue from Step 5.

  2. Once your account is created, you’ll see the TikTok Ads Manager dashboard. In the top bar, click on Tools > Events.

  3. Click on Connect Data Source. In the next window, select Web as your data source. You can optionally enter the link to your funnel or skip this step.

  4. Next, choose Manual Setup as your connection method. Then select Events API and click Next. Here, you’ll need to give your Pixel a name.

  5. Under Set up business funnel, you can either use a template or manually configure your funnels, events, and parameters.

  6. Click Next to see your Pixel ID and create an Access Token. You’ll need both later when setting up the integration in Heyflow.

Step 2: Connect your heyflow

  1. Now, go to your heyflow and navigate to Integrate and Analytics.

  2. In the list, select TikTok Conversions API and enter the copied Pixel ID as well as the Access Token into the corresponding field.

  3. Click on Connect to save the integration.

🔎 If you haven't already, it's reasonable to also activate the TikTok Pixel integration in Heyflow where you simply insert the Pixel ID. We will automatically de-duplicate the events so events are only tracked once. This is not necessary for the TikTok CAPI integration though.

Step 3: Testing

  1. Go back to your data source in the TikTok Event Manager and click on Test Events.

  2. Next, copy the Test Event Code and paste it into your Heyflow integration. Save the integration and publish your funnel again.

  3. Finally, go through your live funnel and submit a test response. After some time, the event will appear in TikTok under Test Events.

Step 4: Set Live

Testing looks good? Awesome! To set the TikTok Conversions API live, simply

  1. Remove the Test ID from your integration settings,

  2. Save the changes, and

  3. Re-publish your funnel.

Congrats, your Conversions API is live 🎉

Step 5: Map your data fields (Optional)

To enhance event quality and gain more flexibility in TikTok reporting, you can map Heyflow fields directly to TikTok Conversions API (CAPI) parameters.

💡This mapping feature allows you to control which customer information is shared with TikTok, ultimately helping improve event matching quality and advertising performance. Benefits of field mapping include:

  • Matched events can be used for ads attribution and ad delivery optimization.

  • Unmatched events cannot be used for attribution or optimization, but still contribute to basic measurement.

  • The higher the event match quality, the better TikTok can track conversions and optimize campaigns.

What you'll need to be able to use the field mapping function:

  1. Ensure the TikTok Conversions API is correctly connected in your flow.

  2. Assign a System Label to each block that contains data you want to map. This is a required step to make the fields selectable in the Heyflow fields.

  3. Go to the Field mapping tab within the integration settings. Choose the relevant Heyflow fields (e.g., email) and map it to the appropriate TikTok CAPI field:

    1. Email

    2. Phone

    3. External ID

  4. Click on Save changes and publish your flow again to activate the mapping.

❗ Important: The data you mapped in your integration is only appended for submit events.


Troubleshooting

I don't see any events

There may be several reasons for this:

  • Changes not published yet: First, make sure that your flow has been republished after you have made changes to the integration.

My submit event gets tracked twice

If the submit event gets tracked twice, this probably means that you have activated individual tracking of the submit button. This is not necessary, as the submit event will always be tracked as Complete_Registration by default.

To make sure it only gets tracked once, open the block settings for your submit button and remove the checkmark in the tracking tab.

Did this answer your question?