Platform ConnectionsMeta (Facebook)

Connecting Meta (Facebook)

Connect Meta to CleanClicks with a Conversions API access token generated directly from your dataset in Events Manager.

CleanClicks sends conversion events to Meta via the Conversions API (CAPI). Meta requires a manually generated access token rather than OAuth. Generating one takes about two minutes and does not require creating a System User.

Prerequisites

  • A Meta Business account with access to Events Manager
  • A Meta Pixel / dataset (if you don't have one yet, see No pixel yet? below)
  • Full control of the dataset (if you don't have it, see Not an admin? below)

Use your existing pixel/dataset. CleanClicks dispatches server-side events into the same dataset your browser pixel uses, with deduplication keys so browser and server events merge cleanly. Never create a second pixel just for CleanClicks.

Generating the access token

  1. Go to Meta Events Manager
  2. Select your pixel/dataset in the left sidebar
  3. Open the Settings tab
  4. Scroll to the Conversions API section
  5. Choose Set up direct integration
  6. Select the Set up with Dataset Quality API option — this also activates the Generate access token link
  7. Click Generate access token and copy the token somewhere safe. Meta shows it only once.

Avoid the Gateway trap. Meta's setup wizard actively steers you toward "Conversions API Gateway" and partner/cloud relay options (Datahash and similar). Do not pick any Gateway or partner option — CleanClicks is your server-side integration, and a gateway is a redundant paid middlebox. If you see "Choose a partner" or "Conversions API Gateway," back up and pick direct integration instead.

No pixel yet?

If your business has never created a pixel/dataset:

  1. In Events Manager, click Connect data
  2. Choose Web
  3. Choose Conversions API > Set up direct integrationnot "Meta Pixel," not a partner integration
  4. Name the dataset after your website
  5. Continue to the Settings tab and generate the token per the steps above

Not an admin?

Generating a token requires full control of the dataset. If your access level doesn't show the Generate access token link, either:

  • Ask your Business admin to generate it. Copy-paste request you can send them:

    "Can you open Meta Events Manager, select our pixel ([pixel name/ID]), go to the Settings tab > Conversions API section > Set up direct integration > choose 'Set up with Dataset Quality API,' click Generate access token, and send me the token securely? It's for connecting our server-side conversion tracking (CleanClicks). Takes about two minutes."

  • Or ask the admin to grant you full control of just that dataset (dataset-level permission, not Business-wide admin). Once granted, generate the token yourself with the steps above.

Either way, the data CleanClicks collects and delivers is identical — it doesn't matter who generates the token.

While you're on the dataset's Settings tab, set these so the dataset contains exactly what CleanClicks dispatches — controlled, auditable, and free of Meta-guessed noise:

SettingRecommendedWhy
First-party cookiesOnImproves match quality for returning visitors
Automatically include more detailed page and product infoOffYour dataset should contain exactly what CleanClicks sends, not AI-scraped page guesses
Core setupOffCore setup restricts custom parameters and URL paths; off means maximum data
Automatic advanced matchingOffCleanClicks already sends hashed emails server-side, deliberately
Track events automatically without codeOffPrevents Meta-guessed events from polluting your deterministic event set
Conversions API connectionDirect integration with Dataset Quality APIGives you match-quality observability in Events Manager
Traffic permissionsAllow list with your domain(s)Blocks pixel hijacking; CleanClicks CAPI events carry your domain as the source URL

Connecting in CleanClicks

  1. Go to Connections in your CleanClicks dashboard
  2. Select your domain
  3. Find Meta in the Token Entry section
  4. Click to expand
  5. Paste your Access Token
  6. Enter your Pixel/Dataset ID (shown in Events Manager under the dataset name, or in Settings)
  7. Click Save

Configuring the Vendor

After connecting:

  1. Go to Configuration > Vendors tab
  2. Enable Meta (Facebook)
  3. Verify the Pixel ID and Access Token are present
  4. Optionally add a Test Event Code for testing
  5. Save

Deduplication

  • Fresh dataset created for direct integration only (no browser pixel firing): no dedup consideration needed — CleanClicks is the only event source.
  • Existing dataset with a browser pixel still firing: CleanClicks sends dedup keys so Meta merges the browser and server copies of the same event instead of double-counting. Keep both running; that overlap is what makes server-side recovery measurable.

Test Event Code

Meta provides a Test Event Code in Events Manager > Test Events tab. Adding this code to your CleanClicks vendor configuration sends events in test mode so you can verify they arrive correctly before they count as real data.

To use:

  1. Go to Meta Events Manager > your pixel > Test Events
  2. Copy the test code (e.g., TEST12345)
  3. Paste it into the Test Event Code field in Configuration > Vendors > Meta
  4. Save
  5. Trigger a test conversion
  6. Verify it appears in Meta's Test Events tab
  7. Remove the test code when you're ready to go live

How It Works

When a visitor converts:

  1. CleanClicks captures the fbclid (Facebook Click ID) from the landing page URL
  2. The conversion event is sent server-side to Meta's Conversions API with the fbclid
  3. Meta matches the conversion to the original ad click
  4. Customer email is sent as a SHA-256 hash for Enhanced Matching

Meta's Conversions API also receives:

  • Event name and value
  • User agent and IP information
  • Attribution parameters

CCPA and opt-out behavior

When a visitor opts out (through Global Privacy Control, a CleanClicks opt-out cookie, or your consent platform's "reject"), CleanClicks sends Meta nothing for that visitor. Opted-out conversions are dropped before they leave CleanClicks, not transmitted to Meta under Limited Data Use or any other flag.

For visitors who have not opted out, conversions are sent to the Conversions API normally. CleanClicks does not attach data_processing_options: ["LDU"] by default.

Troubleshooting

IssueSolution
No "Generate access token" linkSelect the Set up with Dataset Quality API option first — the link activates after that selection. If it's still missing, you don't have full control of the dataset (see Not an admin?).
Token rejectedRegenerate the token from the dataset's Settings tab > Conversions API section and re-paste it.
Events not in Events ManagerCheck the Pixel ID is correct. Use a Test Event Code to verify delivery.
"Invalid Pixel ID" errorThe Pixel ID should be a numeric string (e.g., 123456789012345). No letters or dashes.
Events showing but no conversionsMake sure you have a matching conversion event configured in Meta Ads Manager.

Next: TikTok