What is Facebook Conversion API (Facebook CAPI) Server-Side Tag?

Author : Elizabeth Mathew

Insight by: Elizabeth Mathew

As you are aware, after the Apple iOS 14.5 update which was rolled out with option for the users to opt out of tracking, your Facebook Pixel is unable to collect user data like it could previously. 

This has made the size of your custom audience, lookalike audiences to shrink. Again, when you look at the reporting side for your Facebook campaigns, you can see underreporting on conversions, events, ROAS, etc. The Facebook report data became unreliable to make informed decisions. 

Facebook, with the help of Facebook Conversion API (CAPI) helps you fix some of the data loss issues associated with iOS 14.5 update.

To use Facebook Conversion API via Google Tag Manager, you need to have server-side tagging in place for your website. 

You can download our free white-paper that talks all about the death of third-party cookies by 2023 and the importance of server-side tracking here

Facebook Conversion API server-side tag enables you to seamlessly send the event data to the Facebook Conversion API from a server-side environment that you have created using Google Tag Manager Server-Side Tagging.

Server-Side Tagging in GTM: A Quick Overview

Server-side Tagging in GTM enables you to move your data collection mechanisms from your website into a server container in your Google Cloud account. This allows you to minimize the use of javascript libraries. Also, using Server-side Tagging in GTM could potentially mean having more security for your customer data.

Inside the Google Tag Manager server and web containers, you will need to set up server-side tracking for Analytics (Universal or GA4) and configure events for those actions that you want to track with Facebook conversion API. 

For Facebook Conversions API, the server-side tag can be added from the Github Repositories tab, you do not need to create the tags from scratch, our developers have already created ready-to-use Facebook Conversions API server-side tag for you.

How to Set Up the Conversions API for Website

The steps you can follow to use Facebook Conversions API Server-Side Tag

  1. Download template.tpl to your desktop
  2. facebook CAPI template
    Link: https://github.com/Ayruz-Datamarketing/facebook-conversion-tag
  3. From the template tab on the left side of GTM server-side Click → New → 3 Dots on the Right Side → Click Import→ Select and add Downloaded template file for Facebook Conversion API → Click Save
  4. Template Adding GTM Server-Side

  5. There are below variables that you need to update in the next few steps for Facebook Conversion API server-side tag
    • Facebook pixel ID
    • Facebook API Access Token
    • Test ID (Optional)
  6. Add your Facebook pixel ID and Facebook API Access Token as a variable which you would need to track Facebook Events. You can get your Facebook Pixel ID by going to the Overview tab Inside of Facebook Business Manager.
  7. Facebook CAPI Server-side

    Server-Side Event Data Parameters

    1. You can configure general data parameters that you want to send to Facebook for eg: Event ID, Event Time, Page URL, Action Source like website etc.
    2. FacebooK CAPI server-side general parameters

    3. Along with general parameters, you can also pass the values of custom data parameters like product name, currency, and other E-commerce values.

Server-side facebook capi custom parameter

  1. Add trigger to Facebook Conversion API Server-Side Tag :  Configure Trigger for Facebook Conversion API tag for all events or custom events by clicking triggers in server-side GTM.

trigger for server-side facebook capi


We recommend the following conversion events at a minimum like an Email, Signup, Add to cart, Purchases, and Product View to ensure you have accurate data across all of your conversion metrics.

Go to your website and perform any events such as Purchase, Add to Cart, etc.. you will be able to see the Facebook Conversion API has worked successfully,

Notify of
Inline Feedbacks
View all comments