Tracking Facebook ads in Google Analytics consists of two primary steps:
- Apply clear and consistent UTM Parameters. So that you can identify Facebook traffic in Google Analytics
- Import cost, impression, and click data into Google Analytics. So that you can analyze Facebook Ads and Google Analytics session data.
Analyzing performance holistically can be a daunting task. Given that Google Analytics and Facebook Ads don’t always play nicely together. But as a data-driven marketer understanding campaign performance across platforms is critical.
So let’s explore an efficient method of tracking Facebook ads in Google Analytics. Right after we take a look at the current problem.
Tracking Facebook Ads in Google Analytics is Time Consuming
Reporting works well within the confines of one specific ad platform.
Google products, for example, work well together. You can easily link Google Analytics (reporting) and Google Ads (advertising). This enables you to analyze performance data in a single reporting interface.
Now take Facebook. It has become a prominent advertising platform. But does not, like Google, have a diverse product stack. This makes it hard to provide reporting outside of the Facebook ecosystem. Such as Facebook ads tracking in Google Analytics
Note: Facebook does provide a reporting and an Analytics Tool that is worth exploring.
Since there is no way to seamlessly connect the two platforms, what are our options?
- Analyze and report on each platform in silos.
- Map Facebook and Google Analytics data in a spreadsheet.
- Perform manual exports & GA custom data cost imports.
- Blend or join Facebook and Google data in Data Studio using paid connector like this one.
These options, even with a process in place, can be extremely time-consuming. As a result, you find yourself spending a lot of time pulling data. Rather than analyzing and optimizing campaign performance
In this article, I will go over three available Google Analytics features. You can leverage these features using Google Analytics to track Facebook Ads.
- Data Import
- Calculated Metrics
- Custom Reports
It Starts with Proper Facebook Ads Tagging
Let’s go back to the beginning.
The common setup for Facebook ads tracking is to use UTMs. Many digital marketers use the Google Campaign URL Builder. The URL Builder generates UTMs to track Facebook Ads in Google Analytics. They typically look something like this:
Aside from the manual effort required, there is nothing wrong with this approach.
Another common approach is to utilize the Build URL Parameter feature. You can access this tool in the URL Parameter section. To find this section scroll all the way to the bottom when creating a Facebook ad in the Ads Manager.
Once you click on Build URL Parameter you will have the option to add static and dynamic values.
Dynamic values enable you to build URL Parameters across campaigns. This works pretty well if you do not have too many campaigns to tag. However, there are some drawbacks.
First, Facebook sets dynamic name-based values when the campaign is published. If you are using IDs this is not an issue since they are only set once. But if you are using name-based values such as the Campaign Name this can be an issue.
For example, what if you publish a draft on day one. Then the next day you are required to change the campaign name. Facebook’s URL Builder won’t recognize this change. Instead, it will use the original name-based value set when the campaign was published.
Second, only defining the source as ‘facebook’ and medium as ‘cpc’ provides limited insights for Google Analytics tracking Facebook Ads. More often than not you are using custom URL Parameter values to track information.
Third, you are relying on a human to make sure that every ad created on Facebook is properly tagged. You are also relying on the media buyer to make sure none of the nuances are missed.
Using Available Facebook Campaign Fields
There is a more straightforward way to tag your URLs for Google Analytics and Facebook Ads. And you won’t have to come up with a unique naming convention for UTM fields.
The best way to track Facebook Ads in Google Analytics is to create a unique naming convention. Your naming convention will then be used to dynamically populate UTM fields. This can be achieved by pulling name-based values for Facebook Campaigns, Ad Sets, and Ads.
Below is an example of what the UTM fields and their respective Facebook values would look like:
Campaign – “Campaign Name”
Source – “Facebook” or “Instagram”
Medium – “Ad Set Name” (read audience)
Ad Content – “Ad Name”
Note: Not using cpc for medium can skew default channel grouping in Google Analytics. You can either modify your channel grouping or map custom parameters to custom dimensions.
There are three ways you can go about tagging your Facebook Ads with UTM Parameters. These are ordered from most to least time-consuming.
- Use the bulk export and import method via the Facebook Ads Manager.
- Build URL Parameters using the native Facebook Ads Manager Builder
- Use EasyAutoTagging which automates tagging all of your Facebook Ads.
Note: I go into the details of steps one and three here.
Now that we covered the proper application of UTM Parameters across all of your ads. Let’s look at importing cost data into Google Analytics to better track Facebook Ads.
Linking your Google Analytics Account
So, how can you track Facebook Ad cost, impression and click data in Google Analytics?
Google Ads has a feature called Auto-Tagging. This feature links Google Analytics to Google Ads for easy reporting.
However, given the walled garden effect, they do not make it that simple for Facebook.
First, we have to import Facebook campaign cost, impression and click data into Google Analytics. You can do this in one of two ways:
Once cost, impression and click data is imported we will be able to leverage the All Campaigns and Cost Analysis reports.
Option 1: Manual Cost Data Import
Without EasyAutoTagging, you are limited to exporting Facebook campaign data daily, weekly, or monthly, then manually importing it into Google Analytics via Data Imports.
First, go to your Facebook accounts Ads Manager and select your desired date range:
Select the Ads tab across the top and Go to Columns and Select Performance and Clicks:
Customize columns and add Campaign Name, Ad Set Name, and Ad Name:
Click Breakdown > by time > Day
Select the campaigns you would like to import and export these to a CSV file:
Open the CSV and delete all columns except:
Day (Reporting Starts), Amount Spent, Campaign Name, Ad Set Name, Ad Name, Impressions, Link Clicks
Once you have these cleaned up, head over to Google Analytics and go to Admin > Data Import
Select your cost import dataset.
Note: I go into the detail on how to set up cost, impression, click DataSet in Setting Up Cost Data Sets.
Copy and paste the headers into your CSV respectively of column values.
For source, you need to manually add the source as Facebook and/or Instagram depending on campaign/ad set placement.
Format the date column from 5/3/2017 to this 532017
Your final results should look like this:
Go back to Data Imports in Google Analytics and click on manage uploads > Upload File and upload your CSV doc.
Option 2: Automated Daily Import
With EasyAutoTagging’s you can easily link your Facebook Ads to Google Analytics. Linking accounts will activate daily imports of Facebook cost, impression and click data.
EasyAutoTagging also auto-generates URL Parameters for tracking Facebook Ads in Google Analytics.
Both the tagging and cost data import features use the same UTM Profile. As a result, imported data is always joined with session data in Google Analytics. With your data aggregated and mapped you can leverage existing reports. For example the Cost Analysis report (see below).
Now that you don’t have to manually stitch data together. You can also leverage custom reports in Google Analytics. Which makes reporting on platform metrics and session behavior easier. Since you can track Facebook Ads directly in Google Analytics.
To get started with EasyAutoTagging follow the setup instructions here.
Reporting on Facebook in Google Analytics
Now that we know how to track Facebook Ads in Google Analytics, where can we see our Facebook ad analytics?
Let’s start with two default reports that Google Analytics gives us:
- Campaign Report
- Cost Analysis Report
In the campaign view, we can see an overview of campaign performance.
We can break down campaign performance further. All you have to do is add secondary dimensions to see ad content or source/medium or keyword breakdowns.
Cost Analysis View
The Cost Analysis View shows:
and some primary on-site metrics for PPC campaigns. This allows us to track Facebook campaigns alongside user behavior data in one place.
Both of these Google Analytics reports, can already provide a wealth of insights.
Next, let’s take tracking Facebook ads in Google Analytics one step further. To do this let’s explore Calculated Metrics and Custom Reports.
Google defines Calculated Metrics as follows:
Calculated Metrics are user-defined metrics that are computed from existing metrics and drive more relevant analysis and enable greater actionability without leaving the product.
Note: You can only create five calculated metrics per view in the standard Google Analytics version.
Ok, so here are a few example metrics that we might want to see in our reports:
CPV – cost per visitor (this will always be different than CPC since many platforms have a clicks to session drop off up to 25%)
Goal Conversion Rate
Let’s get started…you can find calculated metrics in your Admin section
Add a new custom calculation, call it CPV and define the formatting type as Currency (Decimal):
Enter the formula and click Create:
Take the same steps for your specific goal conversion rate and cost per conversion. In this case, we will use engaged user.
Now that we have the custom calculations in place, we can go ahead and set up our custom reports for Google Analytics Facebook tracking.
Facebook data aggregated in Google Analytics doesn’t mean you have to use Google Analytics for reporting. However, having your data aggregated does make it easier to pull Facebook performance.
For the sake of this article, let’s stick with custom reports within Google Analytics.
Let’s go ahead and set up a custom report.
Go to Customization and click create a New Custom Report
Select a Flat Table and add:
Campaign | Source / Medium | Ad Content
Impressions | Cost | Clicks | CTR | CPM | CPC | CPV | Session | Engaged Users | CP Engaged User | CR Engaged
Apply Filters as needed:
Select your view:
Label the report and hit save.
You can now see all of your campaign platforms and on-site data in one place.
Tell us in the comments what you have done to make tracking Facebook ads in Google Analytics a seamless process?