Meta Pixel & Conversions API
LeadCapture integrates with Meta (Facebook) tracking at two levels: the Meta Pixel for client-side event tracking, and the Conversions API (CAPI) for server-side event delivery. Together, they give you the most accurate attribution data for your ad campaigns.
Why Use Both?
The Meta Pixel runs in the visitor's browser and can be blocked by ad blockers or privacy settings. The Conversions API sends events directly from the server, bypassing browser-level restrictions. Running both channels together ensures that your conversion data is as complete and accurate as possible. Meta automatically deduplicates events that arrive through both channels.
Setting Up Meta Pixel
- Open your funnel in the builder.
- Go to the Funnel Settings tab (gear icon).
- Scroll to the Tracking & Analytics section.
- Toggle Enable Meta Pixel to ON.
- Enter your Pixel ID. This is a 15 to 17 digit number found in Meta Events Manager under Data Sources.
- Save the funnel.
Once enabled, the Meta Pixel SDK loads automatically on your funnel page (both hosted and embedded). A PageView event fires on load.
Assigning Events to Steps
You can fire specific Meta events when a visitor advances past a step in your funnel:
- Select a step in the builder.
- In the Properties Panel, find the Meta Pixel Event dropdown.
- Choose an event: Lead, ViewContent, AddToCart, Purchase, or Contact.
- Save the funnel.
When a visitor successfully passes that step, the selected event fires to Meta with a unique event ID for deduplication.
Setting Up Conversions API (CAPI)
CAPI requires a separate Dataset ID and Access Token from Meta. Here is how to configure it:
Getting Your Credentials
- Go to Meta Events Manager and select your Pixel.
- Click the Settings tab.
- Find your Dataset ID. This may be different from your Pixel ID.
- Scroll to the Conversions API section and click Generate access token.
- Copy both the Dataset ID and Access Token.
Configuring in LeadCapture
- Open your funnel in the builder.
- Go to Funnel Settings and scroll to Tracking & Analytics.
- Under Meta Conversions API, toggle Enable Conversions API to ON.
- Enter your Dataset ID.
- Enter your Access Token.
- Optionally, enter a Test Event Code for debugging (found in Events Manager under Test Events).
- Save the funnel.
How CAPI Works
When a lead is submitted and has a Meta event assigned to the current step:
- The Meta Pixel fires the event in the browser (client-side).
- LeadCapture captures browser cookies and click IDs for improved matching.
- The server sends the same event to Meta's Conversions API with hashed contact data (email, phone, name).
- Meta receives both events and deduplicates them using a shared event ID.
All personal information is hashed before transmission. LeadCapture never sends raw contact data to Meta.
Testing Your Integration
- Install the Meta Pixel Helper browser extension.
- Open your funnel and check that a PageView event fires on load.
- Submit a test lead and verify the assigned event (e.g., Lead) fires.
- For CAPI testing, add a Test Event Code in your funnel settings, then check Events Manager > Test Events after submitting a test lead. You should see both a client-side and server-side event.
Troubleshooting
| Issue | Solution |
|---|---|
| PageView not firing | Verify the Pixel ID is correct and tracking is enabled in funnel settings. |
| Step events not firing | Make sure you assigned a Meta event to the step in the Properties Panel and saved. |
| CAPI returning "Object does not exist" | You may be using your Pixel ID instead of your Dataset ID. Check Events Manager Settings for the correct Dataset ID. |
| CAPI returning "Missing permissions" | Generate the access token directly from Events Manager's Conversions API section. |
| Duplicate events in Events Manager | Verify that both client and server events use the same event ID. LeadCapture handles this automatically. |
Good to Know
- Meta Pixel and CAPI are configured at the funnel level. Different funnels can use different Pixel IDs and Dataset IDs.
- CAPI access tokens are stored securely and never exposed to client-side code.
- CAPI delivery is processed in the background. If it fails, the lead submission is not affected.
- CAPI delivery results are visible in the Lead Detail page under the webhook delivery logs.
- Meta Pixel and CAPI are included on all plans at no extra cost.