Conversion Tracking for Facebook Ads

conversion tracking facebook ads event tracking google tag manager

Last updated on August 10, 2021, 9:01 PM

Conversion Tracking Setup for Facebook Ads with the Google Tag Manager

Since Facebook can be a very strong conversion channel in addition to Google Ads, it makes sense to have a reliable conversion tracking setup here as well. Since Facebook of course cooks its own soup, Google Analytics must also be connected correctly here to make the data more comparable.  The goal of the whole exercise is to get exact numbers for each conversion in performance marketing in order to be able to optimize the campaigns accordingly.

In Facebook itself, there is the option of tracking standard events or custom conversions. For the standard events, the setup effort is somewhat lower, but you also have to be content with standard categorizations that often don’t quite fit the individual use case. With custom conversions, there are no limits to your imagination, but the setup is a bit more complicated.

Here you can learn how to use both options for your website and conversion tracking setup for Facebook Ads campaigns.

Table of Contents:

Der Facebook Pixel und die Einrichtung mit dem Google Tag Manager
Facebook Standard Events und Conversion Tracking
Das Facebook Lead Event als Beispiel für ein Standard Event Conversion Tracking Setup

The Facebook Pixel and the setup with the Google Tag Manager

The first step to the conversion tracking setup at Facebook is the setup of the Facebook Pixel. This Javascript code snippet must be included on all pages that you want to track so that Facebook also knows what is happening on the website.

In principle, it works similarly to Google Analytics. It is important to note that you only have one Facebook pixel available per Facebook advertising account. You can install this pixel on several websites, but that makes tracking a bit more confusing. My recommendation here is to think carefully about how to set up your Facebook Business Manager account and ad account structure if you have multiple websites and want to feature multiple (different) products/sectors/themes with Facebook campaigns. But now on with the setup:

Due to the similarity to the Google product, there is also the advantage that you can also integrate the Facebook Pixel very easily on your website via the Google Tag Manager. Here are the links to the setup of the Facebook Pixel and the integration via Google Tag Manager. Since I assume that most of you have done this for a long time, here for now only the links. (the exact instructions with screenshots will follow :)

Facebook Standard Events and Conversion Tracking

The Facebook Pixel comes equipped with some standard events.

Website-event Description Standard-Event-Code
Add to cart Capture when items are added to the shopping cart, e.g. click, target page for “Add to cart” button fbq(‘track’, ‘AddToCart’);
Add Payment Info Capture when payment information is added in the checkout process, e.g. click, destination page for billing data. fbq(‘track’, ‘AddPaymentInfo’);
Add to Wishlist Capture when items are added to wish list, e.g. click, target page for “Add to Wish List” button. fbq(‘track’, ‘AddToWishlist’);
Complete Registration Capture when a registration form is filled out, e.g., subscription completion, registration for a service fbq(‘track’, ‘CompleteRegistration’);
Contact Call/SMS, email, chat or other form of contact between a customer and your company fbq(‘track’, ‘Contact’);
Product persosonalization The personalization of products using a configuration tool or other application owned by your company fbq(‘track’, ‘CustomizeProduct’);
Donations Capture donations to your business or cause fbq(‘track’, ‘Donate’);
Find Location Capture when a person searches for one of your pages on the Internet or one of your Applications to visit or use it fbq(‘track’, ‘FindLocation’);
Initiate Checkout Erfassen, wenn Personen den Checkout-Vorgang starten, z. B. Klick, Zielseite für Button „Kaufabschluss“ fbq(‘track’, ‘InitiateCheckout’);
Lead Capture when someone expresses interest in your offer, e.g. inquiry, registration for trial version, calling up the page with the price information fbq(‘track’, ‘Lead’);
Purchase Capture purchases or completions of the checkout process, e.g. reaching the “thank you” page or the confirmation page fbq(‘track’, ‘Purchase’, {value: ‘0.00’, currency: ‘USD’});
Appointment booked Record the booking of an appointment to visit one of your sites fbq(‘track’, ‘Schedule’);
Search Capture searches on your website, in an app, or other asset, such as product search. fbq(‘track’, ‘Search’);
Trial subscription Record the start of use of a free trial of a product or service you offer, e.g., trial subscription fbq(‘track’, ‘StartTrial’, {value: ‘0.00’, currency: ‘USD’, predicted_ltv: ‘0.00’});
Submit Application Capture when a registration form is submitted for a product, service, or program you offer, such as a credit card, educational program, or employment opportunity fbq(‘track’, ‘SubmitApplication’);
Subscription Record the start of the paid subscription to a product or service fbq(‘track’, ‘Subscribe’, {value: ‘0.00’, currency: ‘USD’, predicted_ltv: ‘0.00’});
View Content Record calls to key pages, e.g. product page, target page, article fbq(‘track’, ‘ViewContent’);

However, these must also be installed using Google Tag Manager, or manually in the code on the website where they should “fire”. Since I have already written about the Google Tag Manager and the advantages to tag management with this tool, here we go with the Google Tag Manager settings for your Facebook event tracking.

The Facebook Lead Event as an example of a standard event conversion tracking setup.

As a small example to explain the principle, I choose the “Lead” event. For a service-oriented website, for example, you could run a Facebook campaign and define the successful contact of a user (=lead) via e-mail or contact form on the website as a conversion. By using the FB pixel on the website, this conversion can now also be led directly back to the Facebook ad manager.

The exciting thing is of course that you can then use this conversion to optimize the campaign. So you don’t have to optimize on the very imprecise clicks on the Facebook ads or jumps to the landing page but can really use the users who have made contact, i.e. have become a successful lead.

But now to the exact setup of the Facebook Lead Event using Google Tag Manager:

Installation of the lead event code on the website using Google Tag Manager.
This involves creating a new tag that contains the code as a “Custom HTML” element. The first step here is to navigate to the tags and then click on “new/New”. Since my Tag Manager version is set to English, you can see all screenshots with English labels here.

Facebook Lead Event - conversion Tracking mit Google Tag Manager - schritt 1

After that the appropriate tag type is selected, in our case it is “Custom HTML” tag

Facebook Lead Event - conversion Tracking mit Google Tag Manager - schritt 2

The next step is to simply copy&paste the standard lead event code from Facebook and click Save in the upper right corner.

Facebook Lead Event - conversion Tracking mit Google Tag Manager - schritt 3

Thereby you have created the tag, but next you have to create a trigger that triggers this tag. Here it is usually a little tricky because you have to know exactly which element you can use as a trigger on your website. In my case, there is only the mailto link on the contact page, which I now also use as a trigger. More precisely, the click on the mailto link is used as a trigger condition. The whole thing looks like this.

Here is the trigger definition which then triggers the tag and thus “passes” the event to Facebook and thus Facebook recognizes that a lead conversion has occurred.

Facebook Lead Event - conversion Tracking mit Google Tag Manager - Trigger einstellungen

Here as trigger type: “Click – just links” is used and the trigger is further restricted to “some links click” which fulfill the condition that the click URL contains “mailto:[email protected]”. So this trigger will only work if a link click happens on a mailto link that also contains my contact address.

To check if the events arrive in Facebook, you have to go to the “Events Manager” section in the Business Manager, click on “Pixel” in the tools and you should see the lead event and ideally a number other than 0 :) But be careful, it can take up to 10 minutes until Facebook displays something here.

facebook pixel event tracking - conversion tracking setup check

To check if the events arrive in Facebook, you have to go to the “Events Manager” section in the Business Manager, click on “Pixel” in the tools and you should see the lead event and ideally a number other than 0 :) But be careful, it can take up to 10 minutes until Facebook displays something here.