How to Set Up Meta Conversions API with Stape (Step-by-Step)

Disclosure: this article may contain affiliate links. If you sign up through them, we may earn a commission at no extra cost to you.

Meta's Conversions API (CAPI) lets you send website events directly from a server to Meta. Combined with the browser pixel, it gives Meta's algorithm far more complete data. In this guide, we set up CAPI using server-side Google Tag Manager hosted on Stape — a reliable approach that works with almost any website or store.

Official website: stape.io

What you need before starting

  • A Meta Pixel (dataset) and access to Events Manager.
  • A Google Tag Manager web container already installed on your site.
  • A Stape account.
  • Access to your domain's DNS settings to create a tracking subdomain.

Step 1: Create a server container in GTM

  1. In Google Tag Manager, create a new container and choose Server as the target platform.
  2. Select Manually provision tagging server and copy the container config string.

Step 2: Host the container on Stape

  1. In Stape, create a new container and paste the config string.
  2. Choose the server location closest to your audience.
  3. Once deployed, Stape gives you a default tagging server URL.

Step 3: Add a custom tracking domain

Using a subdomain of your own domain (for example sst.yourstore.com) makes requests first-party, which improves cookie lifetime and data quality.

  1. In Stape, add your custom domain.
  2. Create the DNS record Stape provides (usually a CNAME or A record) at your domain registrar or hosting provider.
  3. Wait for verification, then set this URL as the Server container URL in GTM.

Step 4: Send data from the web container

Your web container must forward events to the server container. The most common method is a GA4 tag whose server_container_url points to your tracking subdomain, or Stape's Data Tag, which sends richer e-commerce data.

Make sure your events include:

  • Event name (page_view, view_item, add_to_cart, begin_checkout, purchase).
  • E-commerce values: value, currency, content IDs.
  • User data when available: email, phone (hashed by the tag), first and last name, city, country.
  • A unique event_id.

Step 5: Configure the Meta Conversions API tag

  1. In the server container, open the Template Gallery and add Stape's Facebook Conversions API tag.
  2. Generate an access token in Meta Events Manager (Settings → Conversions API → Generate access token).
  3. Enter your Pixel ID and access token in the tag.
  4. Map event names to Meta standard events (PageView, ViewContent, AddToCart, InitiateCheckout, Purchase).
  5. Set triggers based on the incoming client (GA4 or Data Client).

Step 6: Deduplicate browser and server events

When you run both the pixel and CAPI, Meta needs to know that two events are the same action. Send the same event_id from both:

  • Generate the ID in the web container (a variable or the dataLayer).
  • Pass it to the browser pixel as eventID.
  • Pass it to the server event as event_id.

Meta then counts the action once.

Step 7: Test everything

  • Use GTM Preview for both web and server containers to verify the flow.
  • Use Test Events in Meta Events Manager with the test code.
  • Place a test order and confirm the purchase arrives from Browser and Server, deduplicated.
  • After a few days, check Event Match Quality and improve it by sending more customer parameters where you have consent.

Common mistakes

  • Forgetting to set the server container URL in the web tag.
  • Different event IDs in browser and server events (double counting).
  • Sending value without currency.
  • Ignoring consent requirements in regions such as the EU — make sure your consent banner controls what you send.

Final thoughts

Once configured, a Stape-based CAPI setup runs quietly in the background and gives Meta's algorithm the data it needs to find buyers. It's one of the highest-return technical improvements an advertiser can make.

Comments

Popular posts from this blog

How to Build a High-Converting Landing Page With Lovable in One Afternoon

Claim Free TikTok Ad Credits: How New Advertisers Can Get Started on TikTok Ads

TikTok Ads for E-commerce: The Complete Beginner's Guide