Facebook pixel setup: how to get the Pixel ID, test event code and Conversions API access token
· 4 min read
Step by step: find the Pixel ID, test event code and Conversions API access token in Meta Events Manager, then enter and test them in the swifttu Pixels page.
On this page
Once your Facebook (Meta) pixel is connected to swifttu, conversion events such as installs and sign-ups are sent back to your ad account per link, which helps ad delivery optimize. You need three things: the Pixel ID, a test event code (optional, for debugging) and a Conversions API access token (for server-side sending). The sections below show where each one lives in Meta Events Manager. Third-party dashboards change from time to time, so menu names may differ slightly from what you see.
Pixel ID
The Pixel ID is a string of digits that tells Meta which pixel the conversion events belong to.
- Sign in to the business account you run ads with and open Meta Events Manager.
- Click "Data sources" on the left and select the pixel you want to use.
- Open the pixel's "Settings" tab. The "Pixel ID" at the top of the page is the value to enter. Click copy.
- No pixel yet? Go back to "Data sources", click "Connect data source" > "Web", create one, then come back and copy the ID.
Test event code
The test event code makes your test traffic show up separately on Meta's "Test events" tab so you can confirm events arrive. It is optional and only needed while debugging.
- In Events Manager, select the pixel and click "Test events" at the top.
- In the "Test server events" area, find the code that starts with TEST and copy it.
- The test code is for debugging only. Clear it in swifttu before going live so test events do not mix into real data.
Conversions API access token
The access token is the password for server-side sending: swifttu uses it to act for your pixel and send conversion events from the server to Meta. You can save the pixel without it, but events will only be reported from the browser and the match rate will be lower.
- On the pixel's "Settings" tab, scroll down to the "Conversions API" area.
- Click "Set up manually".
- Click "Generate access token" and copy the Access Token. It is shown only once, so save it somewhere safe right away.
- If you do not see this option, finish the Conversions API Gateway setup first and choose "Self-hosted".
- Treat the access token like a password: do not paste it into chats or share screenshots of it. If you suspect a leak, generate a new one in the same place and the old one stops working.
Enter and test it in swifttu
With all three values in hand, go back to swifttu:
- Open "Pixels" in the left menu, choose the Facebook tab and click "Add Facebook pixel".
- Enter a name (only used to tell pixels apart in the list) and the Pixel ID. In the "Server-side events" area, enter the test event code and the Access Token.
- After saving, a status of "Available" in the list means server-side sending is configured; "No server-side events" means the Access Token is still empty.
- In "Promo links", edit the link you will run, tick the new pixel in the "Pixels & backups" section and save.
- Open the link on your phone and walk through the flow, then go back to the "Test events" tab in Meta Events Manager. The events you just triggered should appear.
- Once events look right, clear the test event code in swifttu, save, and start running ads.
Ad delivery notes
- This product is built for Android users: target Android devices only in your ad set. The path is "Audience" > "Detailed targeting" > "Behaviors" > "Mobile device user" > "All mobile devices by operating system"; tick Android only and leave iOS unticked.
- Only fill in the test event code while debugging, and clear it before going live.
- The Pixel ID and the access token go together: if you switch to another pixel, use the token generated for that pixel.
- #Pixel
- #Conversions API
Other languages: 简体中文
Ready to try it?
Sign up free and launch your first landing page in minutes.
Sign up freeRelated articles
- Adjust attribution setup: how to get the App Token, S2S security token and event tokensStep by step: find the App Token, S2S security token and event tokens in the Adjust dashboard, then enter and test them in the swifttu Attribution page.
- TikTok pixel setup: how to get the Pixel ID, Access Token and test event codeStep by step: find the Pixel ID, Access Token and test event code in TikTok Ads Manager, then enter and test them in the swifttu Pixels page.
