Skip to the main content.
Featured Image

How To Configure Facebook Conversions API With Google Tag Manager

As advertisers, owners of an e-commerce, we want to know what is happening with our traffic. Originally we were blind, but with the Facebook pixel we get to have information about user activity in order to optimize campaigns, segment audiences, etc. 

Today, the conversion pixel has become your eyes to know what is happening on your website. In fact, it has a very important dual function for an e-commerce:

  • It saves in our browser a cookie (text file) containing a unique identifier. Specifically, a third-party cookie, i.e. a cookie inserted at the request of a third party ( in this case). 
  • It sends Facebook data on the user's activity together with the ID stored in this cookie. 

With this information, we will be able to have a traceability of what happens in our e-commerce. But, what happens with the user's privacy in all this journey? Let's review the main changes in privacy policies since 2018....

  • In 2018, the GDPR (General Data Protection Regulation). First browser restrictions on sending cookies.
  • In 2019, OS operating system vendors announce policies to request users to be tracked.
  • In 2020, the ECDC (European Data Protection Committee) announced new guidelines for the processing and use of cookies. Also in that year, the Consumer Privacy Act is published in California.
  • In 2021, new privacy framework for restricting data sending in iOS 14 is made public.
  • Google Chrome has announced that sometime in 2023 Google Chrome will stop using third-party cookies to identify the user (Privacy Sandbox).

So what does Privacy Sandbox mean for the Facebook Pixel? Currently, most tracking systems rely on 3rd party cookies to track user activity. Among them is the Facebook Pixel. 

In 2024, more than 85% of browsers will block these cookies by default, including Google Chrome. When this happens we will not be able to identify the user through pixels. 

How big is it for an e-commerce business to lose user traceability? Not being able to identify the user translates into:

  • NO tracking
  • NO attribution
  • NO optimization
  • NO remarketing
  • NO web audiences



What is Facebook Conversions API and why do you need it?

Facebook Conversions API is a server-side interface that links your server, website or CRM data to Meta. This API allows you to see how users interact with your website. Also use user behavioral data to personalize and optimize your ads, and ensure that your ads are shown to those users who would be among the most likely to be interested in your products and click on the ad as a result.

Simplifying: This is an alternative method to still be able to send events to Facebook without having to rely on the pixel or third-party cookies. It consists of sending the events from our server, instead of sending them from the browser.

What does it mean from the server?

Until now, the Facebook Pixel code was inserted into the user's browser (usually via Google Tag Manager), to track their activity and send the signals directly to Facebook's servers.

events data pixel

With CAPI Facebook, we must send the user's activity on our website, not only through the Pixel as before, but also through the Conversions API. This method uses a server created under our domain name, which receives the user activity and sends it to Facebook in the correct format.

facebook capi

In the future, when browsers block third-party cookies, sending events through the Conversions API using the server-side implementation will be the only viable method of keeping track of user activity on our website.

server side tracking


What are the advantages of using Facebook Conversions API?

The fact of being able to keep the traceability of the user's activity in the e-commerce is the main advantage of using Facebook Conversions API. However, there are three other important factors to take into account:

  • Reduced cost per action as a result of clearer data and better event matching. Combining Conversions API and the Facebook pixel can help you build a more stable connection that allows the delivery system to lower the cost per action.

  • Significant improvement in ad targeting. Establish custom audiences, thanks to improved audience insights; refine retargeting, improve ad reporting, etc.

  • Optimize ad effectiveness and attribution across the entire customer journey. Facebook's Conversions API can help you gain greater control and therefore better understand the impact of digital advertising on your online and offline results.


How to set up Facebook Conversion API with Google Tag Manager

To enable your Facebook Conversion API within your Facebook Business Manager and connect with your Google Tag Manager (GTM), there are 3 options:

  • E-commerce Managers Platforms

If we have an e-commerce manager platform (or CMS for e-commerce), for example in: Shopify, Woocommerce, Magento, Salesforce Commerce Cloud, etc. The speed of implementation in these cases is high-medium because they already include plugins (often free) that help you implement the sending of events per server.

  • Tag Managers

This is the case of many e-commerce, when we have Tag Managers on our website and we implement the events through Google Tag Manager, Tealium, Segment, etc. The speed in this case is medium because it requires mounting your server or including tags that communicate with the server, among other elements.

  • In-House Development

We want to do a custom implementation and we have the necessary technical resources to be able to do it. In this case, the speed of implementation is low.

Taking into account the different options, in Adsmurai we have decided to develop a solution that allows advertisers to abstract from the server side and be able to configure CAPI without leaving Google Tag Manager.


Configuring One Tag in 2 steps

One Tag is a solution developed by Adsmurai that allows you to implement Facebook Conversions API through Google Tag Manager, ensuring seamless conversion tracking with easy configuration of all events.


Step 1: Facebook Pixel ID and Access Token

In the main panel of the One Tag platform, you must indicate which pixel you are going to use in the subscription. To add a new pixel, we must include the ID of our Facebook pixel and the access token.add-new-pixelTo get the pixel ID, you will need to access Facebook's Events Manager from the platform's Ads Manager. Once there, click on Pixel and the ID will be automatically copied. The next step is to paste it in the One Tag panel.facebook pixel idThe Access Token, that is, the password that will allow us to send an event to Facebook and will validate our user to be able to send it. To extract it, we go back to the Facebook Ads Manager and from the Pixel panel, we access Settings. facebook pixel settingsScroll down to the Set Up Manually option and click on Generate Access Token. access token facebook pixelThis code may take a few seconds to appear. And we will copy the information in the main panel of One Tag.

With the pixel identifier information and the access token, we can save the credentials and we will have the pixel inserted in One Tag.


Step 2: Events in your Google Tag Manager

It's time to configure the pixel events from your Google Tag Manager. To do this, go to the Tags panel and click on New.

And we started with the creation of the new label. 

From the Triggering option, we will decide when the tag will be activated (on all pages or on some specific pages).

Then click on Tag Configuration to choose the type of tag. By accessing the Community Templates Gallery, we can search for specific templates. In this case, we will put "Adsmurai" in the search engine and select the template "Adsmurai Facebook Pixel & Conversions API (CAPI)".

Once selected, we add it to our workspace. This template will allow us to insert Facebook events in our web page in a visual way. 

We choose the event, decide how to activate it (Both Facebook pixel for web & Conversions API), add the pixel identifier and select Adsmurai One Tag as our server. 

To configure Adsmurai One Tag as our server, we must enter the API key that appears in the main panel of One Tag.

With this information completed, we will be sending the information to Facebook. If you need to review any of the above steps, this is the Adsmurai One Tag configuration process tutorial:



Frequently asked questions about the One Tag solution


Why is this solution easier than others?

Conversion API tracking initially requires you to set up your own server, code the scripts and keep everything up to date to avoid incorrect tracking.

With Adsmurai's One Tag, you don't have to worry about complex server configurations or code implementations, we take care of it while you focus on day-to-day tasks.


Do I need to know code?

As you have seen in the configuration process, it is not necessary. Everything is done in a codeless interface.


Is it a secure platform?

Absolutely. Your user data is encrypted with SHA-256 (a secure mechanism to anonymize and protect your information), and we do not keep long-term records.


Leave a comment!