How to Track Facebook Ads in Google Analytics 4 (+ Attribute Sales Revenue)

Katie Holmes
24th November 2022

Track Facebook ads more effectively in Google Analytics 4 and attribute sales revenue to your campaigns, both online and offline.

Important Note: Google Analytics is sunsetting Universal Analytics in July 2023 and replacing it with GA4 tracking. For this article, we’ll mostly be focusing on GA4 to ensure you have the most up-to-date information.

Facebook is one of the most popular social networks worldwide, with roughly 2.85 billion monthly active users.

With that figure in mind, it’s no surprise that marketers are leveraging the opportunities of Facebook advertising to increase exposure and drive qualified leads.

As any marketer will tell you, it’s important to understand how your Facebook ads are impacting and influencing your customer acquisition and marketing ROI.

By following this guide, you will learn how to track the performance of your Facebook ads and will become better equipped to attribute your sales revenue back to your most valuable campaigns.

For this article, we’ll discuss:

💡 Pro Tip

Marketers have struggled to match data in Google Analytics and Facebook Ad Manager long before iOS 14 update. Ruler acts as a bridge between Facebook and Analytics. It allows you to capture all interactions throughout a customer journey and provides a single source of truth about which ads, campaigns and landing are generating the most value.

Book a demo a Ruler Analytics to learn more


Why track your Facebook ads in Google Analytics?

Tracking your Facebook campaigns in Google Analytics is essential as it shows you how users are interacting with your website and provides a bigger picture of your customer journeys.

While you can get some basic information from Facebook about your website, it’s nowhere near as extensive as Google Analytics.

Facebook Ad Manager does a great job at telling you how many people saw and clicked on your ad but loses complete visibility of those individuals once they navigate away from the platform.

With Google Analytics, however, you can gather valuable demographic data from your Facebook ad campaigns and track customer behaviour, device functionality and more once a user lands on your site.

Also, with the latest iOS 14 update and the recent changes to the attribution settings, advertisers can now expect to see up to a 40% reduction of reported conversions in Facebook Ads Manager.

Thankfully, Google Analytics can deliver a lot of information on conversions, clicks and sessions to help improve the performance of your campaigns.

💡 Pro Tip

Marketers have struggled to match data in Google Analytics and Facebook Ad Manager long before iOS 14 update.

Ruler acts as a bridge between Facebook and Analytics. It allows you to capture all interactions throughout a customer journey and provides a single source of truth about which ads, campaigns and landing are generating the most value.

Book a demo a Ruler Analytics to learn more


What to do before you track Facebook ads in Google Analytics 4?

Now that we have established the need for using Google Analytics to track Facebook ads, let’s get started with the setup. To track and analyse Facebook ad performance in Google Analytics, you first need to complete the following steps.

Pro Tip

For this guide, we’ll assume that you’ve already migrated over to your Google Analytics 4 account. If you haven’t, don’t worry. We have a complete guide on how to get started with Google Analytics 4.


1. Use URL campaign builder to get started

The first step to tracking your Facebook activity in Google Analytics is to generate a URL parameter for your ads.

Related: How to track links with Google Analytics

URL parameters provide more context and are the most useful method to measure and track your Facebook performance. The best way to build your URL parameter is with Google Campaign URL builder.

Google’s Campaign Builder has various fields that you can use to track key information: 

Once you fill out these fields, a campaign URL is generated. You can use this newly-generated URL to track Facebook traffic and conversions in Google Analytics.

But what should your UTM look like? Let’s go through it together.


2. Define your source, medium and campaign variables

Now that you’re up to speed with Google URL Campaign Builder, it’s time to create your trackable link. 

In all honesty, to track Facebook Ads in Google Analytics, all you need is: 

This is usually enough to track where your traffic and conversion events are coming from in Google Analytics. 

But, if you dive deeper into your ad performance, by all means, include “campaign term” and “campaign content”.

We recommend using campaign term to specify your ad sets and campaign content to differentiate your ad types.   

For now, we’re just going to focus on the mandatory fields in the URL Campaign Builder. 

In this example, we’re going to set up an ad for our marketing attribution product. 

First, we set up the URL. As we want people to book a demo, we’re going to copy and paste the URL to our marketing attribution product page. That way, users can click to learn more about the benefits of our solution before signing up for a demo. 

Next, we add “facebook” to the campaign source. At this point, it’s worth mentioning that UTM parameters are case-sensitive. 

So, you should always be consistent when tagging your links. We recommend using lowercase to ensure all your data is captured in Google Analytics correctly.

Once we’ve included the campaign source, we move onto campaign medium. Use “paid” for your social ads as Google Analytics defines “paid search” as cpc. If you were to use cpc for social paid, your traffic and conversions would be attributed to your paid search channels.

Last up we have campaign name. The campaign name should be the same as the name of your Facebook Ad campaign to avoid any confusion. 

Once these fields are filled, this is what our trackable link should look like: 

And the next step is to add it to your Facebook ad.


3. Add a trackable link to your Facebook ad

There are two ways you can add trackable links to your Facebook ads. 

1. The most common option is to copy and paste your whole URL in the “Website URL field”.

2. The other option is to include your link in your ad copy. You can convert your URL into a short link using a tool like Bitly.

Once you’ve shortened your link, it should look something like this:


How to track Facebook Ads in Google Analytics 4

Your Facebook traffic will get pulled in automatically by Google Analytics 4 as long as you’ve set up your UTM codes correctly.

To check, go to Reporting > Acquisition > Traffic Acquisition.

From the drop-down, change the channel group to view things like: 

You can also use custom templates in Exploration to gain deeper insights into your Facebook Ad performance, such as: 


How to track Facebook Ads in Universal Analytics

If you haven’t managed to migrate over to Google Analytics 4, don’t panic. Universal Analytics isn’t completely gone just yet. 

You have until July 2023 to make the most of UA and its reporting abilities. In fact, 30% of marketers aren’t planning to migrate until July 2023. 

We do advise you to move over at the earliest opportunity. Google Analytics 4 is coming whether we want it or not. You’re best off getting a jump on it now than risk being left behind. 

Here’s how to track Facebook Ads in Universal Analytics. 
Go to Acquisition Report > All Traffic > Source/Medium.

how to track facebook ads - step 4.i - www.ruleranalytics.com

If you’ve set up your UTMs correctly, then you should see that Google Analytics has attributed traffic and conversions to your Facebook channel and medium that you used when you set up your UTM parameter.

To drill down into your campaign and content performance, click on “Other” and select the parameter you want to analyse in the Acquisition report.

how to track facebook ads - step 4.ii - www.ruleranalytics.com

💡 Pro Tip

Follow Katie on LinkedIn for tips and tactics on attribution, analytics and all things digital marketing. Don’t forget to say hi. 👋


Why Google Analytics isn’t the most reliable method to track Facebook Ads

Tracking conversions and traffic for Facebook is just the first step. Turning those clicks and leads into deals and revenue is what matters most.

If you sell products online, Analytics can easily track your marketing revenue and ROAS. A little bit of code in your shopping system can help you to understand which of your Facebook Ads are driving the most sales.

For lead generation companies, the process is a little trickier. 

Google Analytics 4 can’t track the identity of individual visitors. 

The data is anonymised. Google Analytics uses first-party cookies to capture data on your website users and assigns them a unique anonymous id. 

Related: How to track individual users in Google Analytics

Anonymised data in Google Analytics makes it hard for marketers to track their customer journeys.

If you can’t see where visitors are converting into leads, you can’t effectively attribute revenue back to your Facebook campaigns and accurately measure your impact on pipeline generation

The link between your Facebook Ad campaigns and revenue is effectively broken. 

All you have to measure your Facebook campaigns is clicks and conversions. But as any reputable marketer will tell you, clicks and conversions don’t guarantee revenue.


How to attribute revenue to your Facebook Ads 

To track Facebook’s contribution to pipeline generation and revenue, your better option is to use an attribution tool. 

Take Ruler Analytics, for example. 

Ruler enriches your CRM and Google Analytics with attribution data to help you understand which marketing sources generate the highest converting leads and revenue. 

Let’s take a closer look at how Ruler works.

Ruler is a marketing attribution and analytics tool for B2B marketers looking to understand how their marketing impacts pipeline generation and drives revenue.

It tracks your website visitors (including those from Facebook) over multiple sessions and touchpoints. Whenever a visitor converts into a lead, Ruler will connect the dots to create a customer journey. 

Related: How to view full customer journeys with Ruler

Ruler does this by capturing the FBCLID and GCLID using first-party cookies.


“Since the iOS changes, we’ve been relying on the data we get from Ruler way more. Lately, we aren’t getting the right data from Facebook ads portal, so I’m starting to use Ruler to make sure I’m not turning off ads that are actually working (an actual thing that’s happening). For businesses with high value/low quantity leads, this is so key,” Kurt Dunphy, Growth Manager at Rally.



Ruler automatically sends the data you’ve captured on your Facebook leads to your CRM and other marketing tools. This lets everyone in your business track where your leads came from and determine which Facebook campaigns and ads are most valuable to your business.

As leads move from one stage to another, Ruler will keep a record of any changes in its dashboard. With this data, you can spot any bottlenecks in advance and optimise your Facebook campaigns for optimum results. 

When a lead is marked as closed as won, the revenue data is sent back to Ruler, allowing you to determine whether or not your ads are profitable and make changes as required to increase your returns.

Ruler also has a direct integration with Google Analytics. 

Related: How Ruler enriches your attribution reports in Google Analytics

This means you can enrich Google Analytics with Ruler’s revenue data and assess the effectiveness of your Facebook campaigns using different attribution models. 

💡 Pro Tip

One benefit of Ruler is that it uses marketing mix modelling to determine the impact of different Facebook ads on business metrics such as revenue. Ruler’s marketing mix modelling attempts to track invisible touchpoints such as ad views, allowing you to gain a clear picture of your marketing wins (and losses). 

Learn more about Ruler’s marketing mix modelling


Use case for measuring revenue attribution data in Google Analytics

Below is a use case to demonstrate just how important it is to feed sales revenue into your Google Analytics dashboard.

In our acquisition report, we can see that LinkedIn and Facebook have contributed a similar number of leads. 

Let’s say we had an additional budget to spend. Based on the conversion data in Google Analytics, we’d likely invest it into both channels. 

Now let’s add revenue data from Ruler. 

Despite generating the same number of leads, LinkedIn clearly had a better impact on revenue. 

Instead of splitting the budget between both channels, we can focus our efforts on LinkedIn. We can even drill down by campaign and ad to gain maximum revenue.


Start tracking your Facebook ads the right way 

To get the best results, you need to ensure that your Google Analytics and Facebook accounts work together so that you can gain a better understanding of your campaign success.

And, with a tool like Ruler, you can go beyond conversion tracking in Google Analytics and attribute revenue directly to your Facebook ads.

This, in turn, will help you prove–and improve–marketing’s impact on business and will allow you to manage and scale budgets into the areas that have the potential to drive more revenue.

Learn more on how Ruler attributes revenue to your marketing or book a demo and see it in action for yourself.

This was originally published on the September 30th 2020 and updated November 29th 2022 for freshness.