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
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
- Download template.tpl to your desktop
- 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
- 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)
- 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.
- 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.
- 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 Event Data Parameters
- 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.
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,