Contact salesTry for free

How to Setup Facebook Conversion API + Events Deduplication & Hash User Data

Ivanna Holubovska

Ivanna Holubovska

Author
Updated
Mar 27, 2022
Also available in

Facebook Pixel allows you to track what users are doing on your site, collect remarketing audiences and create lookalikes. If the Facebook pixel is implemented correctly, it will feed relevant information to FB machine learning algorithms. FB ML will use pixel data to show your ads to people who are most likely to convert. 

For several years now, we could track events on the site via javascript code, Facebook SDK inside apps, or upload offline events. But how can you track users who installed Ad Blocker or track events outside the site? Or how can you extend a cookie lifetime? It can be done by implementing Facebook conversion API. This article will show you how to set up Facebook conversion API via Google Tag Manager Server Container.

What is Facebook Conversion API?

Let’s take a look at what Facebook Conversion API is and how we can use it to improve event tracking, attribution, and data collection on Facebook. Facebook Conversion API allows sending any events from your server to Facebook server.

Facebook CAPI has the same purpose as a Facebook pixel, but they have different technologies behind them. The policies and restrictions made FB CAPI more tailored to the needs of the modern tracking environment. As for Facebook Conversion API, it doesn’t involve the user’s browser for sending tracking information. Everything is done through the cloud server. It makes user data more secure and accurate.

If we take a closer look at the link of Facebook ads, we will see that at the end of almost any URL, FB appends its additional parameter fbclid. The pixel code on the landing page stores the value of this parameter in a cookie and then sends it along with any Facebook event. Along with click id (fbclid) Facebook uses browser ID (fbp). Fbp and fbc cookies helps FB determine what kind of user landed on your site and who converted. 

FB can match users through other parameters such as email, phone number, first/last name, etc. The more user data you send to Facebook Conversion API, the higher the match rate you receive.

What are the main benefits of Facebook conversion API?

Facebook server-side tagging or Facebook conversion API was available on Facebook for a couple of years. But starting from 2021, FB started to push Conversion API harder. If you have a dedicated Facebook representative helping with your Ad account, he will most likely call you and recommend setting up a Facebook conversion API. 

These are the most important reasons  to consider implementing Facebook Conversion API:

  1. It can help you track users who installed AdBlocker, those using Safari (or any other browser with intelligent tracking prevention algorithms) or people opted out of FB tracking in iOS 14/15. It is possible because the requests are sent from a server, not from the user browser. And third-party cookies will not be blocked. With the help of user parameters you send together with FB CAPI events, FB will match events to users in their database. As a result, you will have more reliable data. 
  2. An extended cookie lifetime. With the help of Facebook conversion API, you will extend the Facebook cookie lifetime to 6 months. If you are not using FB conversion API, Safari will limit cookie lifetime to 1-7 days.
  3. The Conversions API gives you more control over your data and a better understanding of the customer journey.
  4. You can use Facebook Conversion API to track events that happen not on the site. For example, phone calls or offline sales.

How to set up Facebook Conversion API?

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

To sum up, you will need these things to configure Facebook conversion API:

  • Configured Google Tag Manager web container
  • Configured Google Tag manager Server Container
  • Universal Analytics or Google Analytics 4 server-side tracking or Data Tag/Data Client.
author

Ivanna Holubovska

Author

Content contributor at Stape.io, focusing on server-side tracking, digital marketing, and innovative solutions to optimize online business performance. optimize online business performance.

Comments

Try Stape for all things server-side

What’s going on?

Where are we going?

Attention!
This is a stand-up dog zone.