How to set up Facebook Conversion API (CAPI) in FlexiFunnels?

Modified on Tue, 16 Jun at 2:55 PM






 



What Is Facebook Conversion API, and Why Should You Care?

The Simple Version (Imagine This)

Think of tracking customer actions like sending a message to your friend:

  • Old way (Facebook Pixel): You write a message on paper and release it as a smoke signal. Sometimes the wind blows it away, sometimes trees block it, sometimes your friend doesn't see it. ❌ Unreliable.
  • New way (Conversion API): You pick up the phone and call your friend directly. The message always gets through. ✅ Reliable.

Facebook Conversion API is the direct phone line. It sends information about what customers do on your site (sign up, buy, visit a page) directly to Facebook's servers—skipping the unreliable browser-based method that's increasingly blocked by privacy settings and ad blockers.


See this article by Facebook regarding Conversion API - https://www.facebook.com/business/help/2041148702652965?id=818859032317965

Why Does This Matter for Your Ad Campaigns?

The Real Problem: Browsers are blocking third-party cookies and tracking tools to protect user privacy. This means:

  • Facebook doesn't know when someone signed up on your landing page
  • Facebook doesn't know when someone purchased your product
  • Facebook can't optimize your ads to reach similar people
  • Result: You waste money on ads that aren't performing well because Facebook is flying blind


What CAPI Solves: By connecting CAPI, you're giving Facebook the complete picture of what happens after someone clicks your ad. This means:

  •  Better ad targeting – Facebook finds more people like your actual customers
  •  Lower cost per customer – You spend less to acquire each customer
  •  Higher return on ad spend (ROAS) – Your ad budget works harder
  •  Cross-device tracking – Facebook knows if someone saw your ad on their phone but bought on their desktop

Real-world impact: Companies like Hyundai saw a 20% increase in lead-to-sale conversion rates after implementing Conversion API.


Before You Start: What You'll Need

  •  Access to your Facebook Business Manager (admin or advertiser role)
  •  A Facebook Pixel already set up on your FlexiFunnels account
  •  Access to FlexiFunnels Settings dashboard
  •  About 10–15 minutes
  •  A notepad or text file to save credentials (don't skip this!)


How to Integrate Facebook Conversion API with FlexiFunnels 


 
Step 1: Gather Your Credentials from Meta (Facebook)

1.1 Open Your Facebook Events Manager


Go to Facebook Events Manager

You'll see a list of your Datasets on the left side

Find your pixel in the list (it's labeled with the name you gave it, like "My Website Pixel")1.2 Get Your Pixel ID

  1. Click on your pixel name to open it
  2. Go to Pixel Settings (usually a gear icon or settings link)
  3. At the top of the page, you'll see your Pixel ID — a long number
  4. Copy this number and save it in a text file (you'll need it soon)
  5. Example Pixel ID: 123456789012345

    ⚠️ Important: This ID is like your phone number — you need it, but it's not secret. Anyone can know it.

Note: If you don't see a Pixel in Datasets, click "Connect Data" → select "Web" → create a new Pixel and give it a name.

Important: Do this inside your business portfolio's Ad Account on Meta.

4. Navigate to Conversion API inside pixel settings & click Generate Access Token. 


1.3 Generate Your Access Token (The Secret Code)

  1. In Pixel Settings, you have to scroll down until you find the Conversion API section
  2. Once you find it Click Generate Access Token
  3. A long string of letters and numbers will appear
  4. Copy this entire token and save it in your text file

Example token: EAABsbCS1iHgBAG7... (much longer)

⚠️ CRITICAL: This access token is like a password to your Facebook account's ad data.

  • ? Keep it private — never share it, never post it online
  • ? Don't give it to developers unless they absolutely need it
  • ? If you accidentally share it, regenerate a new one immediately


1.4 Enable Automatic Advanced Matching


Still in Pixel Settings, find Automatic Advanced Matching and toggle it ON.

What does this do? It automatically captures extra customer information (like email addresses) when people use your site. This helps Facebook match your customers to their Facebook accounts, making tracking even more accurate.


1.5 Add Your Domain to Traffic Permissions

  1. In Pixel Settings, find Traffic Permissions or Website Options
  2. Click Add Domain
  3. Enter your website domain (e.g., www.yourdomain.com)
  4. Save


Why? This tells Facebook: "Yes, this is my website. Track events here." It prevents other people from stealing your pixel data.

You now have everything you need from Meta. Move to Step 2.


Step 2: Connect CAPI to Your FlexiFunnels Account

2.1 Go to FlexiFunnels Settings

  1. Log into FlexiFunnels
  2. Go to Settings Dashboard: https://appnew.flexifunnels.com/settings
  3. Find the Integrations or Conversion API section


2.2 Create a New Conversion API Connection

  1. Click the + Create Conversion API button


A pop-up will appear with fields for:

  • Connection Name (anything you like, e.g., "My Meta CAPI")
  • Pixel ID (paste the number from Step 1.2)
  • Access Token (paste the secret code from Step 1.3)
  • Click Save


Your FlexiFunnels account is now connected to Meta. You're halfway done.

Step 3: Enable Tracking on Your Pages

Now that CAPI is connected, you need to tell FlexiFunnels which pages should send data to Facebook. You'll do this separately for:

  • Lead/Opt-in Pages (pages where people sign up)
  • Sales/Payment Pages (pages where people buy)


For Lead Pages (Sign-Up Forms)

Goal: Track when someone signs up → sends "Lead" event to Facebook

3.1 Select Your Page

  1. Go to your Project in FlexiFunnels


  • Open the desired project.

Go to Project SettingsGeneral Code


3.2 Activate CAPI for This Page

  • Find Conversion API Settings in the page or project settings
  • From the dropdown, select the CAPI connection you just created (e.g., "Main Website Pixel")
  • Toggle the switch to ON
  • Click Save


What happens now? When someone fills out your form and submits it, FlexiFunnels automatically sends:

  • ✅ A "PageView" event (they saw the page)
  • ✅ A "Lead" event (they signed up)



Now when visitors sign up on this page, Facebook Conversion API will track the page view and lead event as shown below.


Congratulations !! You are all set to track Lead & Page View Events.


For Sales Pages (Payment/Checkout Pages)

Goal: Track when someone makes a purchase → sends "Purchase" event to Facebook


First Repeat the same process we followed for lead pages.


Then Navigate Go to Your Products

  1. Navigate to Products in FlexiFunnels: https://appnew.flexifunnels.com/products
  2. Find the product you want to track

3.4 Enable CAPI for This Product

  1. Click on the product
  2. Go to Conversion API Settings
  3. From the dropdown, select your CAPI connection
  4. Toggle ON
  5. Click Save



What happens now? When someone completes payment, FlexiFunnels sends:

  • ✅ A "PageView" event (they saw the page)
  • ✅ A "Purchase" event (they completed the payment)
  • ✅ The purchase amount (so Facebook knows how valuable the customer is)

CAPI is now tracking events on your pages.


Step 4: Set Up Custom Conversions in Meta (Critical!)

This step is easy to miss but essential. Without it, Facebook won't optimize your ads based on the events FlexiFunnels is sending.


4.1 Go to Meta Events Manager

  1. Open Facebook Events Manager
  2. Click on your pixel


4.2 Set Up a Custom Conversion for Purchases

  1. Look for Conversions in the left menu
  2. Click + Create Conversion
  3. Choose Website Conversion
  4. For the conversion rule, select URL Contains (not "equals")


Important: Use "URL Contains" because FlexiFunnels adds tracking codes to your Thank You page URL. If you use "URL Equals," it might miss conversions if the URL changes slightly.


4.3 Configure the Rule

Scenario: Your Thank You page is at https://yourdomain.com/thank-you

In the URL Contains field, enter:

/thank-you

or

yourdomain.com/thank-you

Why this works:

  • FlexiFunnels might add parameters like ?utm_source=facebook&utm_medium=cpc
  • Your URL becomes: https://yourdomain.com/thank-you?utm_source=facebook&utm_medium=cpc
  • By using "URL Contains," Facebook recognizes it's still the Thank You page
  • If you used "URL Equals," it would only match the exact URL, missing these variations


4.4 Save the Custom Conversion

  1. Give it a name: "Purchase" or "Product Sale"
  2. Click Save
  3. Wait 24 hours for Meta to start recognizing the conversion






Step 5: Choose the Right Page Types in FlexiFunnels

Critical: If you set the wrong page type, CAPI might not send the right events, and Facebook won't optimize your ads correctly.

Here's what each page type does:

Page TypeEvent SentWhen to Use
Default PagePageViewGeneric information pages (blog, resources)
Sales PagePageViewPages where you pitch your offer before checkout
Lead PageLead + PageViewForms, opt-ins, email signups
Checkout PageInitiateCheckout + PageViewPayment form; shows intent to buy
Thank You (Purchase)Purchase + PageViewShown after successful payment
Thank You (Opt-in)Lead + PageViewShown after someone signs up

Setting the Right Page Type

  1. Go to your page in FlexiFunnels
  2. In Page Settings, find Page Type
  3. Select the correct type from the list above
  4. Save


Step 6: Verify Your Setup Is Working

6.1 Check Events in Meta Events Manager

  1. Go to Facebook Events Manager
  2. Click on your pixel
  3. Look for the Test Events or Event Monitor section
  4. You should see:
    • ✅ PageView events (every time someone visits)
    • ✅ Lead events (when someone signs up)
    • ✅ Purchase events (when someone buys)

Timeline: Events appear within seconds to a few minutes.


6.2 Test It Yourself

  1. Visit your page as a normal user
  2. Sign up or make a test purchase (use a test credit card if needed)
  3. Wait 1–2 minutes
  4. Check Meta Events Manager for the event


Common Situations & Quick Fixes


❌ "I don't see any events in Meta Events Manager"

Diagnostic steps (try these before contacting support):

Step 1: Verify your Pixel ID is correct

  • Go to Facebook Events Manager
  • Check your Pixel Settings
  • Copy the Pixel ID again and compare it to what you entered in FlexiFunnels
  • If they don't match, update it in FlexiFunnels Settings and save

Step 2: Check your Access Token

  • Go back to Pixel Settings → Conversion API
  • If your token is old (more than a few months), regenerate a new one
  • Copy the new token
  • Update it in FlexiFunnels Settings → Conversion API connection
  • Save

Step 3: Verify your domain in Traffic Permissions

  • Go to Pixel Settings → Traffic Permissions
  • Make sure your domain is added there
  • If not, add it now

Step 4: Check page type is correct

  • Go to your page in FlexiFunnels
  • Verify it has the right Page Type (Lead, Sales, Checkout, or Thank You)
  • If wrong, change it and save

Step 5: Check CAPI toggle is ON

  • Go to Project Settings → Conversion API Settings
  • Confirm the toggle is ON (not off)
  • Confirm your CAPI connection is selected (not "None")
  • Save if you made changes

Still not working? Mail us at help@flexifunnels.com with:

  • Your Pixel ID
  • A screenshot of your Conversion API Settings (without showing your access token)
  • A test page URL we can visit to verify

❌ "I see duplicate events in Meta (events are being counted twice)"

What's happening: You might be using both CAPI and Meta's Event Setup Tool to track the same event, creating duplicates.

How to fix:

  1. Go to Meta Events Manager
  2. Find any custom events you set up manually (like "Lead" or "Purchase")
  3. Delete any that match these (CAPI already sends these):
    • PageView
    • Lead
    • Purchase
    • InitiateCheckout

Rule: If FlexiFunnels + CAPI is sending an event, don't also set it up in Meta's Event Setup Tool.

Exception: ViewContent and other events not in the list above should be set up separately in Meta's Event Setup Tool.


❌ "Some conversions aren't being tracked on my checkout page"

The problem: Checkout pages have two trigger options, and you chose the wrong one.

Fix:

  1. Go to your Checkout Page in FlexiFunnels
  2. Find Page SettingsInitiateCheckout Trigger
  3. You'll see two options:
    • Button Click Trigger — Fires when someone clicks the checkout button
    • Page Load Trigger — Fires when the page first loads

Choose based on your setup:

  • If your checkout button is a link/button that goes to payment: Use Button Click
  • If your checkout page automatically loads with the payment form: Use Page Load
  1. Save and test

❌ "My custom conversion in Meta isn't recognizing purchases"

The problem: You're using "URL Equals" instead of "URL Contains."

How to verify and fix:

  1. Go to Meta Events Manager → Conversions
  2. Find your conversion rule (usually named "Purchase")
  3. Check the rule — it should say "URL Contains" not "URL Equals"
  4. If it says "URL Equals," edit it:
    • Click the conversion name
    • Change to "URL Contains"
    • In the field, enter your Thank You page path: /thank-you or yourdomain.com/thank-you
    • Save

Why this matters:

Without URL Contains:
  Rule: URL Equals "https://yourdomain.com/thank-you"
  Actual URL: "https://yourdomain.com/thank-you?utm_source=facebook"
  Result: ❌ Not recognized

With URL Contains:
  Rule: URL Contains "/thank-you"
  Actual URL: "https://yourdomain.com/thank-you?utm_source=facebook"
  Result: ✅ Recognized!

❌ "I enabled CAPI but I'm still using old pixel-only setup"

The problem: You might have both CAPI and pixel tracking running, causing issues.

What should happen:

  • ✅ Use CAPI for PageView, Lead, Purchase, InitiateCheckout
  • ✅ Use Meta Event Setup Tool for ViewContent and other custom events
  • ❌ Don't duplicate — don't track PageView twice

To verify:

  1. Go to Meta Events Manager
  2. Check your Event Setup Tool configuration
  3. Make sure you haven't set up rules for:
    • PageView
    • Lead
    • Purchase
    • InitiateCheckout
  4. If you have, delete those rules (CAPI is handling them now)

❌ "I just set up CAPI but conversions show 0"

This is normal for the first 24 hours.

Meta needs time to:

  • Recognize the new events
  • Match customers to their Facebook accounts
  • Update your conversion rules

Timeline:

  • Events appear in Event Monitor: Immediately
  • Custom conversions start tracking: 24 hours
  • Optimization in ads starts: 3–7 days

Check back tomorrow. If still at 0 after 24 hours, use the diagnostic steps above.


How to Know Your Setup Is Working Well

You'll see these signs:

  • Events flowing into Meta Events Manager (within seconds)
  • Custom conversions being tracked (after 24 hours)
  • Ads starting to optimize toward your conversions (after 3–7 days)
  • Lower cost per acquisition (CPA) over time
  • Higher return on ad spend (ROAS) over time

Warning signs (investigate if you see these):

  • Zero events in Event Monitor
  • Event Monitor shows events, but custom conversions show 0
  • Duplicate events in your reporting
  • Sudden drop in event count


FAQ: Common Questions


Q: Do I need a developer to set this up? A: No! FlexiFunnels handles all the technical complexity. You just need to copy and paste two codes from Meta.


Q: Is my access token secure in FlexiFunnels? A: Yes. FlexiFunnels only uses it to send events to Meta. It's encrypted and not visible to anyone except you.


Q: Can I use CAPI with multiple ads accounts? A: Each Pixel ID is tied to one Meta Business Account. If you have multiple accounts, you'll need multiple CAPI connections in FlexiFunnels.


Q: How long until I see results? A: Events appear immediately. Conversions track after 24 hours. Ad optimization takes 3–7 days. ROAS improvements often take 2–3 weeks as Meta gathers enough data.


Q: What happens if I change my access token? A: Regenerate a new token in Meta, update it in FlexiFunnels, and events will keep flowing. Old events won't be lost.


Q: Can I test with fake data? A: Yes! Use test credit cards and real email addresses. Meta will recognize them as tests and won't count them toward your conversion rates.


Submit a Ticket

If you've tried the troubleshooting steps above and still need help, mail us at help@flexifunnels.com with:

  • Your Pixel ID
  • Your website domain
  • The page type(s) you're tracking (Lead, Purchase, etc.)
  • A screenshot of your Conversion API Settings (without the access token)
  • What you've already tried to fix it

Our team will help you get back on track within 24 hours.



Note


Test Event Code Optional 

Verify events in Events Manager → Test Events before relying on live data. Test events are not counted as live conversions. 

Any event sent with this code is routed to the Test Events tab only. It is not used for attribution, ad optimization, audience building, or your reported conversion totals — and won't affect live campaign performance. 

Live mode. No test code set — events are sent to production and count toward attribution and optimization normally.

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article