How to Track Facebook Ads in Google Analytics
Published January 13th, 2022, updated February 15th, 2022
Summary - Tracking your Facebook Ads in Google Analytics allows you to improve attribution. Follow these steps to track your Facebook Ads in Google Analytics.
We’re a small digital marketing team at Klipfolio, which means we have to focus on staying lean while growing traffic and leads for the business. Advertising on Facebook is something we've experimented with. In fact, Inbound.org even featured how we did it.
As with every advertising initiative we’ve tried, we monitored performance each day to ensure this would be a cost-effective avenue for us (SPOILER: it totally was).
We tracked overall spend, cost per action (CPA), number of trials, and quality of trials. All was running smoothly, until we ran into a big problem.
We found a discrepancy between what we saw in Ads Manager, Google Analytics, and Marketo—and this meant our reporting was inaccurate. We couldn’t allocate more money into our Facebook Ads program without having a better view into our performance.
Turns out, the solution to eliminate the discrepancy between Facebook Ads and Google Analytics was simple: create URL parameters. Along with that discovery we learned a few other important lessons along the way.
Use the steps below to get off to a great start, and become the Facebook Ads rockstar you were born to be.
How to track Facebook Ads in Google Analytics
Tracking your Facebook Ads in Google Analytics allows you to improve attribution from an individual ad or ad set all the way through to a conversion. And it couldn't be easier. Here are the steps to track your Facebook Ads in Google Analytics:
- Use a URL builder to create parameters
- Define your parameters based on ad, ad set, and campaign
- Generate a new URL for your ads
- Track performance in Google Analytics
Step 1: Use a URL builder to create parameters
Start by finding a URL builder tool that works best for you—I like to use Google’s own URL builder. This is where you will create the URL parameters that you’ll be able to track in Google Analytics.
Note: While I prefer using a URL builder, Facebook also offers parameter tracking within Ads Manager. You can manually insert parameters to track ads, ad sets, and campaigns.
Step 2: Define your parameters based on ad, ad set, and campaign
This is where all the magic happens. Within the URL builder tool you will:
- Type in the destination URL you want to use for your ad
- Use “facebook” as your Campaign Source
- Use either “cpc” or “cpm” as your Campaign Medium depending on how you are tracking conversions—either by click or by impressions.
- Use your Facebook Ads campaign name as your Campaign Name. This is where you will be able to monitor performance across all your Facebook campaigns.
- Use your Facebook Ads ad set name as your Campaign Term. This will allow you to track performance across ad sets.
- Use your individual ad names as your Campaign Content. This will allow you to track performance down to an individual ad.
This is what the end result should look like:
Step 3: Generate a new URL for your ads
Now that you’ve created your parameters, you can generate your unique URL. This is what you will use to track your performance in Facebook. Simply copy and paste this link into the destination URL section when building out your ads.
Step 4: Track performance in Google Analytics
Now that you’ve got your parameters created and your new URL in your ads, you can start tracking your Facebook Ads performance in Google Analytics. To do this you’ll want to:
1. Go to Acquisition
2. Click on All Traffic
3. Click on Source/Medium
4. From Primary Dimension, select the parameter you want to track by using the Other drop down and choosing the Acquisition group.
Using these steps, you’ll be able to do a deep dive into your digital advertising performance from the Campaign level all the way down to the individual ads just by adjusting the Primary Dimension. If you followed along during Step 2, Define your parameters, use the following Primary Dimensions for your reporting:
- Campaign: this will allow you to track your Facebook Ads Campaign performance
- Keyword: use this to deep dive into your ad set performance
- Ad Content: this will allow you to analyze individual ad performance
Setting up Facebook Ads as a Default Channel in Google Analytics
If social media advertising or Facebook Ads is a primary channel for your business, you may also decide to set it up as an additional Channel in Google Analytics. This can be useful for differentiating between the different types of advertising campaigns you run. For example, quickly being able to analyze Paid Search, Display, and Paid Social.
Setting up a new channel in Google Analytics is fairly straightforward, especially if you have a good convention for UTM tracking. You will want to go into your View’s settings and select the option Channel Settings, and select Channel Grouping.
In the Default Channel Grouping, you can add a Define a new channel and add parameters to specify how to classify that definition. In theory, you could select any source that contains “facebook” that also includes a medium equal to “cpc.” Setting this up and having it work correctly depends on you precisely following your UTM convention.
This isn’t a decision you should make lightly, however. It will impact how data is collected moving forward and may confuse folks to see a new channel suddenly appear in their reports. But, it’s a valid way to enhance your tracking if you think it’ll be valuable.
Tracking Facebook Ads in Google Analytics 4
Google Analytics 4 touts many benefits for marketers, but for those of us who’ve grown up with Universal Analytics, it presents a shift in how you look at web performance. For example, GA4 no longer uses bounce rate for its default reporting, instead relying on engagement rate. This makes sense when you consider GA4 is often used to track app performance – and many applications developed with frameworks such as React are technically a single page, meaning every visit would be counted as a bounce.
This shift in perspective, however, doesn’t negate the ability to track Facebook Ad performance in GA4. Similar to Universal Analytics, you can get a snapshot of performance from the Acquisition reports and look through the list of sources in the centre panel.
While in Universal Analytics you’d be watching for Goal Completions, in GA4 you will want to monitor Conversions and Engagement Rate. Conversions are set up much the same way as Goals – configure a conversion based on an event being fired on your website, such as form completion or a high value pageview.
Engagement Rate is new in GA4 and is defined as meeting one of the following criteria:
- Sessions that are longer than 10 seconds
- Sessions with one or more conversion events
- Sessions with two or more views (equivalent to pageviews in Universal Analytics)
In short, everything you’ve done to ensure an optimized UTM strategy will still benefit you in GA4. The only thing you can’t do at the time of writing is configure a new default channel in GA4.
How use to HubSpot’s Facebook Ads integration
If you’re a HubSpot user, you can take your Facebook Ads reporting to the next level by connecting your Facebook Ads account to your HubSpot instance to manage your lead generation. The Ads integration requires an add-on, but if you have access to it then it’s worth checking out!
The Facebook Ads integration allows you to create your ads right from HubSpot—from creative to targeting. For example, for lead generation ads you can create a HubSpot form for your ads. That way, as soon as someone completes the form, they are placed into your lifecycle in HubSpot.
From the HubSpot Ads dashboard, you can track the total number of impressions, clicks, contacts, and who converted to a customer. The dashboard also displays the total amount of advertising dollars spent and the ROI. And the best part is that your leads are available within your HubSpot contacts database. You’ll never have to import a contact list again! From here, you can continue to move leads through your marketing funnel with targeted or other relevant offers.
Track all of your social media marketing in one place
You can track your ads performance in HubSpot. But for more detailed reporting, bring all of your social media advertising data into PowerMetrics and create a social media marketing dashboard.
How excited are you for your next Facebook Ads report?
As many of us digital marketers know, Facebook Ads can generate a high number of qualified leads. Unfortunately, even slight discrepancies in data can make it difficult to understand whether Facebook Ads is a cost-effective channel for your team.
By refining your process and accurately creating URL parameters, you’ll be able to eliminate data discrepancies and determine the value Facebook Ads can bring to your business.
This post was originally published in March 2017 but has been updated for accuracy.