If you run a WordPress site and advertise on Facebook or Instagram, you’ve probably seen data loss from browser restrictions or tracking blockers. That means Meta can’t always tell which campaigns actually drive sales or signups.
Meta Conversions API (CAPI) is a solution for that and it works best when you set it up server-side.
This guide shows how to install Meta CAPI on your WordPress site using server Google Tag Manager (sGTM) and WordPress plugin by Stape. You’ll learn how to collect more accurate event data, improve ad performance, and stay compliant with privacy rules without relying on cookies or pixels alone.
If you run Meta ads and use Pixel to measure results, you probably already see incomplete data. That’s because browser-based tracking can’t do the job right anymore. Browsers like Chrome, Safari, and Firefox limit cookies and use ad blockers to protect user privacy. Privacy updates like those in iOS 14 also keep a big part of user behaviors untracked.
Basically, you risk paying for clicks or conversions Meta doesn’t see: someone clicks your ad and takes action on your site, but that action isn’t reported back to Meta because of the new browser features, so it looks like nothing happened.
To address this, Facebook launched the Conversions API. This technology brings back data accuracy by bypassing all new browser blockers and sending users’ data from a cloud server rather than from the user's browser. Unlike browser tracking, server-side tracking can include events that happen after the page loads or across sessions, and is not affected by user device settings.
This is how Meta Conversions API will help your business:
The most reliable way to track data for Facebook Ads from your WordPress site is to combine client-side tracking via GTM and server-side tracking via sGTM. This approach ensures better tracking accuracy.
1. Go to https://tagmanager.google.com/ and log in to your Google Tag Manager account. Click on the "Admin" button, and under the "Containers" column, click the "+ Create Container" button.
2. Choose a name for your server container, select "server" as the type of container, and click the "Create" button.
3. Select the option to "Manually provision tagging server," and copy the container configuration that appears. Save this configuration in a text editor as you will need it later.
4. Log in to your account on our service or create a new account if you haven't already.
5. Once you're logged in, click on the "Create Container" button. Give your container a name, paste the Container Configuration that you copied from your Google Tag Manager Server Container, and select the server location. Click "Create Container."
6. Wait for around 5 minutes for the server container to deploy. Refresh the page to update the status. If the setup was done correctly, you should see the status "Running." If you see "Error," double-check that you've copied the correct container configuration. Contact support if the error persists.
7. In this step, you need to set up a tagging URL.
You have two options:
If you choose to go with the first option, move to step 9.
If you want to configure a custom tagging URL, click “Add domain” under the Stape-provided tagging URL.
Then, log in to your domain registrar (like GoDaddy, Namecheap, etc.) and create a new CNAME record for the subdomain you want to use.
You can choose any subdomain (e.g., ss.yourdomain.com). Use the following settings:
Your CNAME record should look like this:
Type: CNAME
Name: ss
Target: ghs.stape.io
TTL: Auto
Proxy: DNS only
Once the CNAME is saved and propagated, you can return to your Stape dashboard and finish the domain verification.
9. You can enable the Global CDN feature for the server container, which uses Cloudflare technology to load JavaScript files from a server closer to your site visitors. This can improve page speed and reduce latency.
Consider your country's privacy regulations before enabling this feature.
After enabling Global CDN, add a CNAME as instructed in your Stape account to complete the setup.
10. Add the tagging server URL to the Google Tag Manager Server container by going to "Admin," then "Settings," and selecting "Container Settings.”
1. Log into your WordPress Admin, and go to the plugins. Then, click “Add New,” type “GTM Server-Side,” choose this plugin, and click install now. Once established, click Activate.
2. Open the GTM server-side plugin you installed in the first step and paste the tagging URL inside the plugin settings. Next, select if you want to add web GTM to all site pages or just add plugin functionality without adding GTM script (this option should be used in case you are using any other plugin that inserts GTM script on the site). Next, add the WEB Google Tag Manager ID, tagging server URL, and Stape container identifier if you want to use a Custom Loader.
3. If you have an eCommerce website and want to push ecommerce events and user data to the Data Layer, click on the second tab of the plugin and enable the two checkboxes.
The most reliable way to implement Meta Conversions API for your WordPress website is by combining Data tag in web GTM with a Data Client in server GTM. This lets you track events on both the browser and server side and use event_id for deduplication.This setup lets you track events both in the browser and on the server side, and use event_id for deduplication.
1. Web container: send event data to the server and Meta
This tag should send event details like event_name, value, currency, item_id, and event_id to your server GTM container.
✅ Important: in the tag’s settings, enter the GTM server-side URL. This is the custom subdomain you verified on Stape, such as:
https://ss.yourdomain.com
This URL sends event data from your web container to the server container.
2. Server container: receive events and send to Facebook
- Install the Data Client in your server GTM container (from the Template Gallery).
- Create a trigger for the Data Client. The trigger name and event should match the custom event name used for the Data tag in your web container (for example, add_to_cart, purchase, etc.).
- Create a Meta Conversions API tag using:
- Attach this tag to the Data Client trigger.
- Open both the web and server GTM preview modes.
- Trigger your test events (for example, add to cart) and check that all tags fire correctly:
- Use the Meta Events Manager testing tool to confirm that both browser and server events are received correctly and that deduplication works as expected.
You can test this event inside the Meta testing tool as well.
Setting up Meta Conversions API on WordPress with server GTM may sound technical, but it’s one of the most reliable ways to improve how your Meta ads perform.
With a precise server-side setup, your data stays accurate even when browsers limit tracking, helping Meta match conversions more reliably and show your ads to people who are more likely to convert.
You’ll need a verified subdomain, the Stape plugin configured on WordPress, and specific tags, triggers, and variables set up in both your web and server containers in GTM.
When everything is done, you’ll be able to improve attribution and run campaigns based on what’s actually working.
All it takes is a few simple steps. Click Try for Free , and configure your server Google tag Manager container with Stape in just 3 minutes.
Comments