Facebook Conversions API Gateway. The easiest way to implement FB CAPI?

Sep 30, 2021
Also available in

Facebook Conversion API Gateway is FB’s newest approach in setting up Conversion API and looks like it’s the easiest one. It is required to have Amazon AWS (only AWS for now) for hosting server events. FB CAPIG receives events from the browser and sends them to the Conversions API. 

With FB CAPIG, you won’t need to set up event deduplication, send user parameters and events from the server. Another huge advantage is having multiple domains/pixels within a single instance of Conversions API Gateway. Multiple pixels work only if they are located under the same Facebook Business Manager. 

This blog post will discuss what Facebook Conversion API Gateway is, its advantages, and disadvantages over server GTM implementation of FB CAPI. I will also show how to set up FB CAPIG using stape.io hosting. It takes only 5 minutes!

All you’ll have to do is use the Facebook Events manager to create the deployment URL, paste the deployment URL in the stape.io CAPIG container and add a DNS record for the subdomain. 

Facebook and server-side trackingCopy link to this section

Facebook released their server-side tracking solution among the first when the server Google Tag Manager was not even in a public beta. 

Since that time, they have tried to make Facebook Conversion API implementation as easy as possible. Recent tracking restrictions in iOS, adBlocker, ITPs, and browsers like Brave, have affected Facebook’s ability to collect information about users. 

FB has been experiencing a significant decrease in the success rates for advertisers. When questioned about these drops, Facebook claimed that it is due to tracking restrictions. Facebook conversion API was designed to overcome these restrictions.

With FB CAPI, you send event and user data to Facebook from the server. This way, Facebook is still able to collect user information when browser tracking is blocked. 

Facebook spent a year actively asking advertisers to implement conversion API. It looks like the speed at which Facebook’s CAPI integration was set up is not as fast as expected. Hence targeting works worse, and campaigns results are lower.

The most apparent reason advertisers do not use FB CAPI is that it’s hard to implement. Stape’s agency has been working a lot with ss tracking and FB CAPI mainly. I would say that for us, on average, it takes about 15 hours to implement FB CAPI using server GTM. The person setting it up for the first time might be X times longer because they need to get familiar with server GTM first.

This is where Facebook Conversion API Gateway comes into the game. CAPI Gateway can potentially work as the fastest solution for implementing Facebook CAPI.

How Facebook Conversions API Gateway worksCopy link to this section

Facebook Conversion API Gateway requires Amazon Web Services, and you do not need the server Google Tag Manager to implement it. FB has a detailed description of how CAPIG works. 

The process starts in Facebook’s events manager interface. Then you will need to send configuration URL to your developers who will set up Amazon Web Services. 

Facebook creates a CloudFormation stack that makes the needed infrastructure element to run the Facebook CAPI gateway. It includes EC2 instances with predefined values and CloudWatch. It sets up only one server for you, and I hope it will be changed in the future. For example, Google recommends having at least three servers for redundancy. 

After all the magic on AWS is done, FB will use pixel to send server events. All things like event deduplication, user parameters, events parameters will work based on FB browser events. 

Sounds simple, right? Let’s get into more details! 

Facebook Conversions API Gateway pros and consCopy link to this section

Pros:Copy link to this section

1. Fast. Facebook Conversion API Gateway looks like the most straightforward way of setting up FB CAPI. No more events deduplication, user parameters, low match score. CAPIG will fit the best for people or agencies who run only Facebook ads and what to improve FB tracking. They can use one AWS instance to host all pixels they have in the FB business manager. Stape.io hosting for FB CAPIG costs $100/month, and you can add as many domains/pixels as you want.

Cons:Copy link to this section

1. New. CAPI Gateway is new, and most likely, FB will roll out new functionality and update the existing one. So you have to be prepared for changes.  

2. Short term solution. If you want to have all benefits from ss tracking, server GTM is the best solution. You will still need server GTM to manage server GA or Google Ads. Besides that, using server Google Tag Manager is more affordable than having both sGTM and FB CAPI Getaway on AWS.

3. Reliability. From what we see in our AWS, Facebook sets up only one server for you. This seems very risky because if one server stops working, there is no backup, which means your data will be lost. Google recommends using three servers in production, which should help immensely with stability and durability against failure – something every business needs when they run ads and rely on conversion data.

Stape hosting for Facebook conversion API GatewayCopy link to this section

You can use stape.io hosting for Facebook conversion API Getaway.

To set up CAPIG with stape, all you need to do is:

  1. Copy the configuration URL inside the FB Events Manager. 
  2. Add copied URL to your stape.io account.
  3. Set a DNS record for your subdomain.

💲 Price

Stape's FB CAPIG hosting costs $100/month, and you can use it for as many pixels as you need.

Once you have created the FB CAPIG container on stape, we create an Amazon AWS cloud formation stack based on Facebook requirements. We will handle all updates for you. 

☝️ Important: Please add a payment method to the FB CAPIG container within 24 hours. Unfortunately, we will have to disable containers that do not add payment within 24 hours.

How to set up Facebook Conversions API GatewayCopy link to this section

1. Open FB events manager -> Settings -> Click Choose a Partner -> Click Conversion API Gateway.

select facebook conversion api gateway

2. Add your domain name -> Facebook will generate a subdomain for you -> Copy a subdomain, we will need it in the next steps -> Click next.

add domain to facebook conversion api gateway 

3. In the deployment method, choose “Select your hosting region”-> Select your Amazon Web Services region -> Click Copy URL -> Save this URL, we will need it on our next step -> Click next.

☝️ Important: the URL you’ve copied is valid only for 24 hours. So make sure you proceed to the next step in 24 hours. Otherwise, you will need to generate a new URL.

copy configuration url facebook capig

4. Go to your stape.io account -> Open CAPI Getaway tab -> Click Create.

create CAPI gateway stape

5. Paste the configuration URL you’ve copied on step 3 -> Add container name.


Copy Admin email and Password to a safe place.

Unfortunately, FB CAPIG does not have an option to restore or create a new password for your FB CAPIG admin. Click create.

stape facebook capig configuration url

6. It will take up to 30 minutes to deploy AWS for your Facebook conversion API Getaway. 

Once you see the CAPIG container running:

  • copy Conversions Api Gateway Instance URL from stape.io admin and open in your browser.
  • set up a DNS record for the subdomain. You should point A record of the subdomain that Facebook created for you and you’ve copied on step 2 to the IP address you see in the stape.io admin.
facebook capig stape
set dns record facebook capig

7. Once you’ve added the DNS record you should see “DNS setup successfully” in the Facebook events manager -> Click Next -> Click Go to console -> Use login and password copied on step 5.

set up subdomain for Facebook Conversion API Gateway

8.  You will have access to the admin with stats about FB CAPI requests.

☝️ Important: if you clicked connect and see that connection is not secure for the custom subdomain, you need to wait. Please return to the same page in 1 hour. SSL certificate will be issued for your domain.

facebook capig admin

You can also use FB events manager to access CAPIG by clicking partner integration.

facebook conversion api gateway set up

9. Once you’ve verified that everything works correctly, please add billing to the stape.io. Facebook conversion API gateway costs $100/month for the unlimited number of pixels and domains. 

☝️ Important: We will have to disable the FB CAPIG container if we do not receive a payment within 24 hours from the creation date.

How to add additional domains and pixels to your FB Conversions API GatewayCopy link to this section

10. Open CAPIG partner integration inside FB Events manager -> Click Settings -> Select Add a pixel to an existing Conversions API Gateway connection.

add new domain facebook capi gateway

11. Select an existing pixel or create a new one -> add a new domain -> click Next. 

☝️Important: If you see the wrong domain (the previous one you added), remove it and add a new domain.

add new domain facebook conversion api gateway

12. You will see the initial subdomain you’ve created for CAPIG and added the DNS record in the Establish Connection. Do not modify it. Click Connect -> You will be redirected to the CAPIG admin -> add email and password that was created on step 5. 

connect facebook conversion api gateway

13. You will see the message “Connection Already Exists” -> Click Connect -> You should see the status Connected -> Click Open Conversions API Gateway.

connect new pixel to facebook conversion api gateway
add new facebook conversion api gateway 

14. In the FB CAPIG admin, you will see the list of all connected pixels. The new pixel will have the status Deactivated -> Click three dots on the right side of pixel -> Activate.

activate new pixel facebook conversion api gateway

How to test Facebook Conversion API GatewayCopy link to this section

15. Open Facebook events manager -> partner integration -> Conversions API Gateway -> Check that connection is active for all pixels you’ve set up, and CAPIG sees events. It should show the same events you’ve set up using a browser integration. 

verify that facebook conversion api gateway onnected

16. Open your website’s console and check that FB sends requests to your subdomain.

test facebook conversion api gateway

CAPI Gateway errorsCopy link to this section

1. Updates. 

If you logged in to the CAPI Gateway admin and saw 404 status or message "Something went wrong," you might need to install updates. Go to Conversions API Gateway and Solutions Installer and check for the updates. Install those if available. You need to wait up to 30 minutes to check if updates helped fix CAPIG.

Facebook conversion api gateway not working

Conclusion:Copy link to this section

There are many advantages of using the Facebook Conversion API Gateway, and the main one is simplicity. If you are interested only in accurate Facebook tracking and have multiple pixels in one Business Manager, then CAPIG might be the perfect solution for you. You can use just one CAPIG and AWS across all your pixels and domains.

But there are some disadvantages as well. Setting up FB CAPI using server GTM would be the best solution for people who want to use server-side tracking across multiple platforms, not only Facebook.

Want to learn more?

All it takes is a few simple questions. Click Get help, fill up the form, and we will send you a quote.

Get help
Tagged with:Facebookgtm server

Host your GTM server at Stape