Meta Ads Integration (CAPI)
Send server-side purchase events back to Meta to optimize your Facebook & Instagram ad campaigns — bypassing iOS 14+ and ad-blocker limitations.
What it does
When a customer clicks one of your Facebook or Instagram ads, the URL contains an fbclid parameter. MenuLogic automatically captures this click ID and, when the customer completes a purchase, sends a server-side Purchase event back to Meta via the Conversions API (CAPI). This tells Meta's algorithm exactly which ad clicks led to real revenue, improving targeting and lowering your cost per acquisition.
How it works
- Click capture
When a visitor lands on your menu from a Meta ad, MenuLogic extracts the
fbclidfrom the URL and stores it alongside the browsing session. - Customer orders
The customer browses the menu, adds items to cart, and completes checkout as normal.
- Payment confirmed
After Stripe confirms the payment, a server-side function fires automatically.
- Purchase event sent to Meta
The function sends a
Purchaseevent to Meta's Conversions API with the order value, currency, and the original click ID — all from the server, not the browser.
Setup
- Navigate to Restaurant Setup → Integrations in the admin sidebar.
- Find the Meta Ads Integration card.
- Enter your Meta Pixel ID — a 15-digit number found in your Meta Events Manager under Data Sources.
- Enter your Conversions API Access Token — generate this in Events Manager → Settings → Conversions API → Generate Access Token.
- Toggle the integration on.
Data sent to Meta
| Field | Details |
|---|---|
| Event name | Purchase |
| Value & currency | Order total in CAD |
| fbc (click ID) | The original fbclid from the ad click, formatted as fb.1.timestamp.fbclid |
| Hashed email | SHA-256 hash of the customer's email for advanced matching |
| Hashed phone | SHA-256 hash of the customer's phone number for advanced matching |
Privacy & security
- All customer data (email, phone) is SHA-256 hashed before being sent to Meta — raw PII never leaves the server.
- Events are sent server-side only, bypassing browser-based tracking limitations (iOS 14+, ad blockers).
- Your Conversions API access token is stored securely and only accessed by server-side functions — it is never exposed to the browser.
- The integration can be disabled at any time via the toggle in Integrations settings.