Meta Pixel, Conversions API and attribution

How do I set up the Conversions API Gateway with Stape?

The Conversions API Gateway is Meta's own product and runs in your AWS or Google Cloud account, or on a partner host. Here is Meta's setup, step by step.

Published

The Conversions API Gateway is a Meta product, not a Stape product, so there is no separate Stape version to install. It runs in your own AWS or Google Cloud account, or on a partner host you choose during setup, and Meta’s documentation does not name Stape among those hosting routes. What follows is Meta’s own setup, plus the checks that tell you the relay is working.

If your goal is server-side events your team does not have to host, the Gateway is one of four routes to the Conversions API, and for lead generation it is rarely the best one. The last section explains why.

Where the Gateway actually runs

Meta describes a no-code product with two parts: middleware that receives events from the browser, turns them into Conversions API events and sends them to Meta, and an admin UI at /hub/capig that shows connected Pixels, event activity and the Conversions API success rate. One instance can serve several Pixels and several domains.

Hosting routeWhat it means
Your AWS accountEKS or ECS Express, owned by the business
Your Google Cloud accounta Google Cloud instance in a region you pick
A partner hosta partner hosts the instance for you, chosen during setup

ECS Express Mode is the cheaper AWS route according to Meta, at a lower fixed monthly cost, and it takes about 25 minutes instead of the 30 to 40 Meta quotes for the standard stack. Agencies and resellers can also run the Gateway for multiple accounts once and onboard client businesses that then connect their own Pixels.

Set it up, step by step

  1. In Events Manager, open the Settings tab and click Get started under Set up with Conversions API Gateway.
  2. Review the prerequisites, then pick your preferences: a cloud setup and one hosting region.
  3. Open AWS, or copy the URL for your AWS administrator. A quick-create stack opens with every field already filled in. Leave ProvisioningData alone and click Create stack. Meta puts the install at 30 to 40 minutes.
  4. From the stack Outputs, open the CapigSetupURL, create the admin account and log in.
  5. Wait for data. Meta says the server and browser counts can take 5 minutes to 2 hours to appear.
  6. Add a custom domain in the Admin UI. Meta recommends it for data routing and says it may reduce costs.

Take the subdomain if you can edit your DNS, using a CNAME record such as gateway.advertiser.com. It makes the Pixel’s requests to the Gateway first-party, which is the whole point of running your own instance.

What it needs before you start

Two admin rights are required: admin access to a cloud provider account, and admin access to the Meta Pixel. Ad accounts are not configured at all, which surprises people who expect to pick them.

For the domain, you have a choice between the default domain and a subdomain of your site. For Pixels, you start with the one you launched the setup from, and you can add more later, including Pixels managed by other business accounts.

Two traps that hit lead generation

The Gateway’s monitoring depends on the Pixel firing, so anything that stops the Pixel stops the relay.

Events configured with the Event Setup Tool are not relayed. If part of your tracking was set up by clicking through the page in that tool rather than in code, those events exist on Meta’s side and never reach the Gateway.

A Content-Security-Policy header can block the Pixel’s requests to your subdomain until you allowlist it. On a site with a strict policy, the install completes and the counts stay at zero, which looks like a broken Gateway and is a header problem.

Check that it works

Four checks, in the order that finds a fault fastest.

WhereWhat working looks like
Events Manager, the connected Pixel’s datasetthe green line of server events follows the blue line of browser events, with a gap near zero
The event’s details, Event Deduplication taba high rate of events deduplicated, and no warning
Event Match Quality, Event Matching taba Good or Great rating, which Meta’s monitoring guide calls optimal
The Gateway’s Admin UIas many events sent to the Conversions API as received from the Pixel

The last row is the one nobody checks and the one that isolates the Gateway itself: if it receives more than it sends, the problem is inside the relay, not in the Pixel. When deduplication looks wrong, Facebook pixel event deduplication with the Conversions API explains how to read the tab.

Then compare the Lead count in Events Manager with the leads your own backend saved. The Gateway generates the event_id for both copies, so the pairing should hold without work from you.

What the Gateway does not fix

Start with the browser. On a landing page, the form submission reaches your server whatever the browser does, while the Pixel’s copy exists only if the script loaded and ran. The standard Gateway setup forwards what the Pixel sends, so a blocked Pixel leaves it with nothing.

From version 1.6.0 the Gateway also has an endpoint your server can post non-web events to, covering offline, app and CRM data. Once your server posts there, you are writing the integration the Gateway was meant to spare you, which is the moment to compare it with a direct integration instead.

Meta’s Help Center pitches the Gateway at businesses that already use the Pixel, do not yet send web events through the Conversions API, spend more than $300 a month on campaigns optimizing for web events, and do not work with an ecommerce partner such as Shopify. On cost, cloud fees are the only cost and start at $30 a month. Meta’s developer docs estimate $39.27 a month for ECS Express handling 10 million events in us-west-2, $83.53 at 250 million events and $600.49 at 2.5 billion, with Google Cloud starting at $12.60 for 10 events per second.

For a single lead generation landing page, those fees buy server redundancy across domains and Pixels, not recovery of blocked events. A direct integration, where the server that saves the lead reports it to Meta, covers that case and costs nothing to host. If you want a vendor to run the container for you, that is a decision to make on the partner option in the setup screen, and it is worth asking that partner what happens when the Pixel does not fire.

The wider comparison, with the field-level payload rules that apply to every route, is in how to set up the Meta Conversions API for lead generation. What server-side tracking can and cannot repair is in server-side tracking for Facebook ads, and the definition of the product itself is in the Conversions API Gateway entry. If your leads start in an Instant Form rather than a landing page, the route is different and the lead ads webhook is where to start.

Questions on this topic

All questions on this topic →

FAQ

Does Stape host the Conversions API Gateway?+

Meta's documentation for the Gateway lists three hosting routes: your own AWS account, your own Google Cloud account, or a partner host chosen during setup. Stape is not named among them. Treat Stape as a tag and server-hosting vendor you compare with, not as a way to install the Gateway.

How long does the Gateway take to set up?+

Meta says the prefilled AWS stack takes 30 to 40 minutes to create. After that, data can take 5 minutes to 2 hours to appear, so do not judge the install by the first five minutes.

How much does the Conversions API Gateway cost?+

Cloud fees are the only cost, and Meta's Help Center says they start at $30 a month, varying with region, usage and Pixel traffic. Meta's developer docs estimate $39.27 a month for an AWS ECS Express install handling 10 million events in us-west-2.

Does the Gateway deduplicate browser and server events?+

Yes. The Pixel sends each event both to Meta and to the Gateway, and the Gateway forwards it with an automatically generated event_id, so the two copies pair up. The Event Deduplication tab in Events Manager is where you confirm it.

Will the Gateway send a Lead that the Pixel never fired?+

No, not in its standard setup. The Gateway forwards what the Pixel sends it, so a visitor whose browser blocked the Pixel produces nothing to forward. Only the server endpoint, which you have to code against, changes that.

Ready to find out what
converts, for real?

Free to start.

Start free →