Set Up Conversions API (CAPI) Token
Learn how to generate a Conversions API Access Token and Test Event Code from Meta Events Manager for use with Ego Pixel.
Overview
Set up Conversions API (CAPI) 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 Meta.
Generate a Test Event Code to verify that CAPI events are received correctly before going live.
Use both values to complete your Conversions API configuration in Ego Pixel.
Get an Access Token for Conversions API
Step 1: Open Event Manager in your Meta Business account
Go to Meta Business Manager and Navigate to Event Manager. https://business.facebook.com/events_manager2
Select Datasets in the left menu.
Choose the dataset (Pixel) you want to use.
Open the Settings tab.
Step 2: Generate the access token
Scroll down to the Set up direct integration section.
Click Generate access token.
Copy the generated Access Token.
Step 3: Add the token to the app
Return to your app’s CAPI configuration page.
Paste the Access Token into the Access Token field.
Click Save to complete the setup.
Get an Test Event Code for Conversions API
Step 1: Open Meta Events Manager
Log in to your Meta Business account, then go to Events Manager. https://business.facebook.com/events_manager2
Select the Pixel (Dataset) that you want to test.
Step 2: Open the Test Events Tab
In the Pixel dashboard, click the Test events tab.
=> This section allows you to test events coming from your browser or server.
Step 3: Copy the Test Event Code
Scroll down to the Confirm your server’s events are set up correctly
Click Copy next to the Test Event Code.
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 Meta Events Manager, allowing you to verify that your Conversions 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, Meta 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 →