TikTok Pixel·3 min read

Set Up Events API Token

Learn how to generate an Events API Access Token and Test Event Code from TikTok Events Manager for use with Ego Pixel.

Overview

Set up Events API to enable accurate server-side event tracking with Ego Pixel.

From this guide, you will:

  • Generate an Access Token to allow Ego Pixel to send server-side events to TikTok.

  • Generate a Test Event Code to verify that Events API events are received correctly before going live.

  • Use both values to complete your Events API configuration in Ego Pixel.

Get an Access Token for Events API

Step 1: Open Events Manager in your TikTok Ads account

  1. Go to TikTok Ads Manager and navigate to Assets → Events. https://ads.tiktok.com

  2. Under Web Events, click Manage.

  3. Choose the Pixel you want to use.

  4. Open the Settings tab.

Step 2: Generate the access token

  1. Scroll down to the Events API section.

  2. Click Generate Access Token.

  3. Copy the generated Access Token.

Important: Keep your Access Token private. Do not share it publicly.

Step 3: Add the token to the app

  1. Return to your app's Events API configuration page.

  2. Paste the Access Token into the Access Token field.

  3. Click Save to complete the setup.

Get a Test Event Code for Events API

Step 1: Open TikTok Events Manager

  1. Log in to your TikTok Ads Manager account, then go to Assets → Events. https://ads.tiktok.com

  2. Select the Pixel that you want to test.

Step 2: Open the Test Events Tab

In the Pixel dashboard, click the Test Events tab.

[Screenshot: Test Events tab]

=> This section allows you to test events coming from your browser or server.

Step 3: Copy the Test Event Code

  1. Scroll down to the Test server events section.

  2. Copy the Test Event Code displayed there.

Note: The Test Event Code may change between Events Manager sessions. If you come back later to test again, check that the code in the app is still the current one.

Step 4: Paste the Code into the App

Go back to your app dashboard and paste the Test Event Code into the Test Event Code field.

=> Once the code is added, all events sent from the server will appear in the Test Events section in TikTok Events Manager, allowing you to verify that your Events API integration is working correctly.

  • Important: After completing the test, make sure to remove the Test Event Code from the app. If the code remains active, TikTok will treat all incoming events as test events, and they will not be recorded in your production event data.

Still need help?

Our support team is available 24/7. Contact support →