Skip to content
Menu
Tracking

Meta Pixel + CAPI

Wire up Meta's browser Pixel and the server-side Conversions API so platform_click fires with full user-matching data.

What you'll install

Two things, both inside Meta Events Manager:

  • Pixel ID — browser-side tag that fires PageView and platform_click.
  • CAPI access token (Pro and above) — server-side relay that fires the same event from our edge, with IP, user agent, fbc, and fbp.

1. Copy your Pixel ID

  1. Go to business.facebook.com/events_manager2.
  2. Pick your Pixel in the left sidebar. If you don't have one, click Connect Data Sources → Web → Create Pixel.
  3. Copy the 15 or 16-digit Pixel ID at the top.
  4. Paste it into DineRoute under Settings → Tracking → Meta Pixel ID.

2. Generate a CAPI access token (Pro+)

  1. In Events Manager, pick your Pixel, open the Settings tab.
  2. Scroll to Conversions API. Click Generate access token.
  3. Copy the token. It starts with EAA…. Treat it like a password.
  4. Paste it into DineRoute under Settings → Tracking → CAPI access token.

3. Verify the event is firing

Open your DineRoute page. Tap any platform button. Within thirty seconds, platform_click should appear in Events Manager → Test events. Look for a match-quality score of 8+ out of 10.

The payload we send

{
  "event_name": "platform_click",
  "event_time": 1733869800,
  "action_source": "website",
  "event_source_url": "https://pizzafusion.dineroute.menu",
  "user_data": {
    "client_ip_address": "203.0.113.42",
    "client_user_agent": "Mozilla/5.0 ...",
    "fbc": "fb.1.1733869800.IwAR…",
    "fbp": "fb.1.1733869800.9876543"
  },
  "custom_data": {
    "platform": "doordash",
    "restaurant_id": "pizzafusion",
    "value": 0,
    "currency": "USD"
  }
}

4. Optimize toward platform_click

In Meta Ads Manager, open your campaign. Change the conversion event from Link Click to platform_click. Give Meta 5-7 days to exit the learning phase. CPA will drop between 20 and 40% on most accounts once the algorithm locks onto the new signal.

Don't switch the event mid-flight. Duplicate your ad set, change the conversion event on the copy, and let the two compete for a week. Kill the loser.

Troubleshooting

  • Event shows up in browser but not CAPI: check that the access token is pasted with no leading or trailing whitespace.
  • Match quality under 6: your customers are clicking from environments that strip fbc/fbp. Usually Facebook in-app browsers. Match quality will self-correct over the first 500 events.
  • Duplicate events: we deduplicate browser + server events via event_id. If you see duplicates, email us with your Pixel ID.