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.

  1. Sign in to the business account you run ads with and open Meta Events Manager.
  2. Click "Data sources" on the left and select the pixel you want to use.
  3. Open the pixel's "Settings" tab. The "Pixel ID" at the top of the page is the value to enter. Click copy.
  4. 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.

  1. In Events Manager, select the pixel and click "Test events" at the top.
  2. In the "Test server events" area, find the code that starts with TEST and copy it.
  3. 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.

  1. On the pixel's "Settings" tab, scroll down to the "Conversions API" area.
  2. Click "Set up manually".
  3. Click "Generate access token" and copy the Access Token. It is shown only once, so save it somewhere safe right away.
  4. If you do not see this option, finish the Conversions API Gateway setup first and choose "Self-hosted".
  5. 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:

  1. Open "Pixels" in the left menu, choose the Facebook tab and click "Add Facebook pixel".
  2. 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.
  3. 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.
  4. In "Promo links", edit the link you will run, tick the new pixel in the "Pixels & backups" section and save.
  5. 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.
  6. 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.
  • #Facebook
  • #Pixel
  • #Conversions API

Other languages: 简体中文

Ready to try it?

Sign up free and launch your first landing page in minutes.

Sign up free

Related articles

swifttu 讯兔swifttu 讯兔

The traffic firewall, smart routing, landing-page studio and dual-ledger payments console for overseas advertisers.

Disclaimer: swifttu only provides compliant traffic-filtering, link-distribution and landing-page tooling. Users must follow the advertising and developer policies of the media platforms they run on (including Meta, Google and TikTok) and must not use the platform for anything that violates local laws.