Guides/Facebook CAPI

Facebook Conversions API (CAPI) Setup Guide

Connect Facebook Conversions API to GeoRedir for server-side conversion tracking. Send purchase, lead, and signup events to Meta for better ad optimization and attribution.

8 min read

What Is Facebook Conversions API?

Facebook Conversions API (CAPI), also called Meta Conversions API, is a server-to-server integration that sends conversion events directly from your tracking platform to Meta's servers — bypassing the browser entirely.

Unlike the Meta Pixel (which runs in the visitor's browser), CAPI works server-side. This means:

  • No ad blocker interference — Browser-based pixels are blocked by 30-40% of users. CAPI can't be blocked.
  • No iOS/cookie restrictions — Apple's ATT framework and cookie deprecation don't affect server-side events.
  • Higher Event Match Quality — Server-side events include more reliable user data, improving Meta's ability to attribute conversions.
  • Better ad optimization — More accurate conversion data means Meta's algorithm can find better audiences and lower your CPA.

Why This Matters for Affiliates

If you're running Facebook/Meta ads to affiliate offers, your pixel is likely missing 30-50% of conversions due to ad blockers and iOS restrictions. CAPI closes that gap by sending conversion data server-to-server, giving Meta the full picture for optimization.

How It Works with GeoRedir

The flow has four steps:

  1. A visitor clicks your Facebook ad → lands on your GeoRedir smart link
  2. GeoRedir redirects them to the right offer based on geo/device rules, appending a unique click_id
  3. The visitor converts (signup, purchase, deposit) on the advertiser's site
  4. The advertiser fires a postback URL to GeoRedir → GeoRedir sends the conversion event to Meta via CAPI
Facebook Ad → GeoRedir Smart Link → Offer Page → Conversion
                                                      ↓
                                              Advertiser Postback
                                                      ↓
                                              GeoRedir receives conversion
                                                      ↓
                                              GeoRedir → Meta CAPI (server-to-server)

This means you don't need to install the Meta Pixel on the advertiser's page (which you usually can't control anyway). GeoRedir handles the CAPI event automatically when a postback conversion comes in.

Prerequisites

Before setting up CAPI, make sure you have:

  • A GeoRedir Business plan or higher (CAPI is available on Business and Scale plans)
  • A Meta Business Manager account with an active ad account
  • A Meta Pixel created (even if you're not using browser-side tracking, CAPI requires a Pixel ID)
  • An access token generated from Meta Events Manager
  • Conversion tracking enabled on your GeoRedir smart link (postback URLs must be working)

Postback First, CAPI Second

CAPI integration builds on top of GeoRedir's conversion tracking. If you haven't set up postback URLs yet, complete the Conversion Tracking Guide first, then return here.

Step 1: Get Your Meta Pixel ID & Access Token

Find Your Pixel ID

  1. Go to Meta Events Manager
  2. Select your Pixel from the left sidebar
  3. Click Settings
  4. Copy the Pixel ID (a 15-16 digit number like 123456789012345)

Generate a CAPI Access Token

  1. In Events Manager, select your Pixel → Settings
  2. Scroll to Conversions API section
  3. Click Generate Access Token
  4. Copy the token — it's a long string starting with EAA...

Keep Your Token Secret

The access token grants permission to send events to your Pixel. Never share it publicly, commit it to version control, or include it in client-side code.

Step 2: Configure CAPI in GeoRedir

  1. Go to your GeoRedir dashboard → Settings → Integrations
  2. Find Facebook Conversions API and click Configure
  3. Enter your Pixel ID and Access Token
  4. Click Test Connection — GeoRedir will send a test event to verify the credentials
  5. Click Save

Once saved, CAPI is enabled account-wide. You can then enable or disable it per smart link.

Step 3: Enable CAPI on Your Smart Links

  1. Go to the smart link you want to track
  2. Click Edit → scroll to Integrations
  3. Toggle Facebook CAPI on
  4. Select the event type to send when a conversion is recorded
Event TypeWhen to Use
PurchaseCompleted sale or deposit
LeadSignup, registration, or form submission
CompleteRegistrationAccount creation
InitiateCheckoutStarted checkout process
SubscribeSubscription signup
ViewContentPage view (sent on click, not conversion)

Match Event to Your Offer

Choose the event type that matches what the advertiser's postback represents. If the postback fires on a deposit, use Purchase. If it fires on a signup, use Lead or CompleteRegistration. Using the wrong event type confuses Meta's optimization algorithm.

Step 4: Event Deduplication

If you're also running the Meta Pixel on a landing page you control, you need event deduplication to prevent Meta from counting the same conversion twice (once from the Pixel, once from CAPI).

GeoRedir handles this by sending an event_id with every CAPI event. This event_id is derived from the click_id:

CAPI Event:
  event_name: "Purchase"
  event_id: "georedir_abc123def456"    ← unique per click
  event_time: 1708905600
  user_data: { ... }
  custom_data: { value: 50.00, currency: "USD" }

If you're also firing the same event from a browser Pixel, make sure the Pixel sends the same event_id. Meta will automatically deduplicate events with matching IDs.

No Pixel? No Problem

If you're only using CAPI (no browser Pixel), deduplication isn't needed. GeoRedir's CAPI events will be the single source of truth.

Step 5: Verify Events in Meta Events Manager

After setting up CAPI and generating some test conversions:

  1. Go to Meta Events Manager
  2. Select your Pixel
  3. Click the Test Events tab
  4. You should see events arriving with:
    • Connection Method: Conversions API
    • Event Name: The event type you configured (e.g., Purchase)
    • Event Match Quality: A score from 1-10

Event Match Quality (EMQ)

Meta assigns an Event Match Quality score based on how much user data is included. Higher EMQ = better attribution = better ad optimization.

EMQ ScoreQualityWhat It Means
8-10ExcellentStrong user matching, optimal for optimization
6-7GoodDecent matching, most conversions attributed
4-5FairSome conversions may not be attributed
1-3PoorWeak matching, Meta can't optimize effectively

GeoRedir sends the following user data parameters (when available) to maximize EMQ:

  • client_ip_address — Visitor's IP from the original click
  • client_user_agent — Visitor's browser User-Agent from the original click
  • fbc — Facebook click ID (extracted from fbclid URL parameter)
  • fbp — Facebook browser ID (if available)
  • country — Visitor's country code from geo-detection
  • event_time — Timestamp of the conversion

Maximize Your EMQ

The single biggest factor in EMQ is the fbc parameter. Make sure your Facebook ad URLs include the fbclid parameter (this is automatic for most ad formats). GeoRedir captures it on click and passes it to CAPI.

Step 6: Optimize Your Ad Campaigns

Once CAPI is sending events, configure your Facebook ad campaigns to optimize for CAPI conversions:

  1. In Ads Manager, create or edit a campaign
  2. Set the conversion event to match what GeoRedir sends (e.g., Purchase)
  3. Under Attribution Settings, select 7-day click (recommended for affiliate offers)
  4. Meta will now use both Pixel and CAPI data to optimize delivery

Comparing Pixel vs CAPI Data

In Events Manager, you can see events broken down by source:

  • Browser — Events from the Meta Pixel
  • Server — Events from CAPI (GeoRedir)

If CAPI is showing significantly more conversions than the Pixel, that's the gap you were missing before — those are the conversions ad blockers and iOS were hiding.

Troubleshooting

Events not appearing in Events Manager

  • Check credentials: Verify your Pixel ID and Access Token in GeoRedir Settings → Integrations
  • Check conversion tracking: Make sure postback URLs are working first. CAPI events only fire when a conversion postback is received
  • Wait 5-10 minutes: There can be a short delay before events appear in Events Manager
  • Check the Test Events tab: Use the test events tool in Events Manager to see real-time incoming events

Low Event Match Quality

  • Ensure fbclid is preserved: Check that your Facebook ad URLs pass through the fbclid parameter and that GeoRedir captures it
  • Check UTM parameters: Enable UTM appending on your smart link to preserve tracking parameters

Duplicate conversions

  • Enable deduplication: If using both Pixel and CAPI, ensure both send the same event_id
  • Check postback configuration: Make sure the advertiser isn't firing the postback multiple times per conversion

Best Practices

  • Always test before scaling. Send a few test conversions and verify they appear in Events Manager before spending ad budget.
  • Use CAPI alongside the Pixel when possible. Meta recommends "redundant setup" — both browser and server events with deduplication. This maximizes data coverage.
  • Monitor EMQ weekly. If your Event Match Quality drops, check that fbclid is being captured correctly.
  • Match event types to your funnel. Don't send Purchase events for signups. Meta optimizes for the event you tell it to, so accuracy matters.
  • Set conversion values. If the advertiser's postback includes a revenue/payout amount, GeoRedir passes it as the value parameter in CAPI. This enables value-based optimization in Meta ads.

Ready to get started?

Create your first geo-targeted smart link in under 2 minutes. Free plan available, no credit card required.

Free plan included • No credit card required • Upgrade anytime