Stape
Search
Contact salesTry for free

Facebook offline conversion using server GTM

Ira Holubovska

Ira Holubovska

Author
Updated
Oct 31, 2025
Published
Aug 16, 2022
Also available in

Marketers who run Facebook Ads often search for better ways to track results and improve campaign performance. Accurate tracking helps measure real actions and optimize ads that bring results. But tracking has become harder with privacy updates and browser limits.

After privacy changes, many advertisers started using the Facebook Conversions API to send data directly from backend to Meta. This helps fix data loss and improve Facebook offline conversion tracking quality. 

Another option is Facebook offline tracking, also called offline conversions. It uses first-party data like CRM or in-store sales that are not blocked by cookies or privacy settings. This method keeps tracking consistent across both online and offline activities.

In this guide, we'll explain how to set up the Facebook offline conversions tag in the server Google Tag Manager container. It helps send data to the Facebook offline conversions API from your cloud server, creating a full offline conversion Facebook Ads setup.

What is Facebook offline conversions?

Facebook offline conversions help track actions that happen outside your website, like in-store or phone sales. It is part of Facebook offline tracking and lets you connect real sales with your Meta Ads results.

You can upload or send offline event data to Facebook using the Facebook Сonversions API. Meta matches this data to people who saw or clicked your ads. When a match is found, the action is counted as an offline conversion Facebook Ads event.

Today, customer journeys often include many touchpoints before a sale. That's why many marketers use offline conversion tracking as an extra layer of analysis when checking campaign performance across both online and offline actions.

There are several ways to start offline tracking on Facebook or integrate your CRM with Meta:

  • Manual upload using a CSV file
  • Built-in a custom integration
  • Connectors like Zapier

Each option has its limits. Custom Facebook offline conversion integration needs developer time to build a connector between your CRM or POS and Meta. Tools like Zapier make it easier, but can be costly if you send many events. Manual upload through CSV takes time and often causes errors.

Stape offers two methods to configure Facebook offline conversion tracking:

Stape Conversion Tracking CRM Apps

Stape has developed a suite of CRM applications designed to send offline conversion data from your CRM directly to the Meta platform. These apps can send lead status updates from CRMs to the platforms you need and automatically generate Customer Match lists in Google Ads.

Find out the configuration guides below:

Using webhooks

If among the CRMs supported by Stape's apps, there is no one you use, you can easily set up Facebook offline conversion tracking with webhooks. In this article, we focus on the benefits and show the configuration process in detail.

Why use Facebook offline tracking?

There might be multiple reasons to use Facebook offline tracking. 

  • Measure events more accurately
  • Create quality custom and lookalike audiences
  • Optimize campaigns towards the best performing ads and ad sets
  • Increase ROAS of FB campaigns

Even if you already use the Facebook Conversions API, setting up offline tracking through server GTM can still help.

It lets Meta receive data about purchases or signups that happen outside your website, like in-store or phone sales. The more complete data you send to Meta, the more precisely its algorithm can learn who is most likely to convert next. This often improves audience quality and overall ad performance.

Offline tracking can also help fill reporting gaps caused by iOS privacy settings. When a person who opted out of app tracking makes a purchase, the Facebook Pixel won't record it. But if your CRM sends this sale to server GTM, Meta can still match it with someone who saw your ad, without using device identifiers. This gives you more complete reports without breaking privacy rules.

Another massive benefit of Facebook offline tracking is that it's still eligible for a 28-day attribution window. While with FB pixel or FB CAPI, the maximum you can get is a 7-day attribution. 

Step 1: Configure webhooks

Below, we will consider setting up webhooks in WordPress using Stape's plugin for WordPress. If you are using another content management system, you will need to do the same - configure the webhook.

1.1 Go to the “Settings” section → “Webhooks” tab.

Enable the “Send webhooks to server GTM container” checkbox and add “Server GTM container URL”.

Configure webhook in WordPress
Configure webhook in WordPress

1.2 To find the server GTM container URL, go to the Stape admin → open container → copy “Domain name” in the section “Domains (Tagging Server URLs)”.

Domain name in Stape admin
Domain name in Stape admin
!

Please note:

Make sure you add a path for the webhooks to differentiate webhook requests from other requests.

Example:

https://ss.wp-demo.stape.dev/webhook

1.3 Enable checkboxes “Purchase webhook” or “Refund webhook” if it works for your case. Click “Save changes”.

Step 2: Enable the preview of webhooks in server GTM

2.1 Open Debug and Preview Mode in server GTM → click on three dots in the upper right corner  → “Send requests manually”.

Send requests manually in server GTM
Send requests manually in server GTM

2.2 Copy X-Gtm-Server-Preview HTTP header.

X-Gtm-Server-Preview HTTP header
X-Gtm-Server-Preview HTTP header

2.3 Go to the Stape admin account → Power-ups → click “Configure” next to sGTM Preview header config.

sGTM Preview header config
sGTM Preview header config

2.4 Enable the power-up and paste the X-Gtm-Server-Preview HTTP header from server GTM.

Enable and configure the power-up.
Enable and configure the power-up.

2.5 Click “Save Changes”.

Step 3: Add Data Client in sGTM

3.2 Go to server GTM → Templates → Client Templates → click “New”. Import the template you downloaded from GitHub.

Import Data Client in server GTM
Import Data Client in server GTM

3.4 Go to the “Clients” section → click “New” → select “Data Client” as Client Type.

Make sure you added the path of the webhooks you configured when creating a webhook in the section “Accepted Path Settings.” In our case, it is “/webhook.”

Client configuration
Client configuration

This way, the Data Client will listen to all requests containing “/webhook” and retrieve data from this request.

How to set up Facebook offline conversions tracking using sGTM

1. In the server GTM, go to the section “Templates” → Tag Templates section → Search Gallery.

Add “Facebook Conversions API”.

Add Facebook conversions API from the Gallery
Add Facebook conversions API from the Gallery

2. Go to the Tags section → click “New” → select “Facebook Conversions API” as Tag Configuration.

Facebook Conversions API Tag in server GTM
Facebook Conversions API Tag in server GTM

3. Configure the tag.

3.1 Choose “Event Name Setup Method”:

  • Inherit from client - with this option, the tag will parse all the data that it finds inside the event data and send it to Facebook.
  • Override - manually map the data from the webhook.

3.2 Choose the “Event Type” and “Action Source” from the list that fits your case.

3.3 Add “API Access Token” and “Facebook Pixel ID”.

To find “Facebook Pixel ID” go to your Business Manager → Events Manager → Data Sources → copy Dataset ID.

Dataset ID in Business Manager
Dataset ID in Business Manager

To find “API Access Token” scroll down and find “Generate access token”.

Generate Access Token
Generate Access Token

That’s the basic tag configuration if you want to send users or some custom data, you can set it up in the sections of the tag.

Below is an example of Facebook Conversions API Tag configuration:

Example of Facebook Conversions API Tag configuration
Example of Facebook Conversions API Tag configuration

4. Add the trigger.

Trigger Type: Custom Event

Event name: specify your event name (in our case, it is “purchase)

This trigger fires on: Some Custom Events

Condition: Client Name equals Data Client

Trigger Configuration for a Facabook CAPI Tag
Trigger Configuration for a Facabook CAPI Tag

Test the Facebook Conversions API tag

1. Open Preview and Debug Mode in server GTM.

2. Go to WordPress Setting tab and click on “Send test webhook”.

Send test webhook
Send test webhook

3. See the webhook in Preview and Debug Mode.

Webhook in Preview and Debug Mode
Webhook in Preview and Debug Mode

FAQs

Conclusion

Facebook offline conversions is one of the ways to boost your FB campaign results and improve attribution. Though offline conversions only are not enough for proper FB tracking and audience collection, it might be an excellent addition to your existing FB pixel tracking and FB CAPI. 

Using FB offline conversions tag for the sGTM container, you can now set up offline conversions easier and cheaper than before. Remember to follow offline conversions best practices to improve the efficiency of your setup. 

If you need help setting up server-side tagging, we are here to help!

author

Ira Holubovska

Author

Ira has 10+ years of digital marketing experience, with the last 5 focused on server-side tracking. She understands how and when it works across various digital marketing scenarios.

Comments

Try Stape for all things server-side