Blog

A blog about data-driven marketing.

EasyAutoTagging – Built to Automate Campaign Tagging & Tracking at Scale

Learn More

Tracking Facebook Ads in Google Analytics [The Easy Way]

I often come across this question:
 
How to set up Facebook Ad Tracking in Google Analytics?
 
You can track Facebook Ads in Google Analytics with UTMs. Each ad needs to have UTM Parameters added on Facebook. So that when a link is clicked it is attributed and can be viewed in Google Analytics reports.
That was the simple answer 😊

Tracking Facebook ads in Google Analytics consists of two primary steps:

  1. Apply clear and consistent UTM Parameters. So that you can identify Facebook traffic in Google Analytics
  2. 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.

 

  1. Data Import
  2. Calculated Metrics
  3. 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:

/http://easyautotagging.com/?utm_source=facebook&utm_campaign=Spring%20Launch&utm_medium=cpc&utm_content=lifestyle%20image

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.

 

facebook build url parameter

 

Once you click on Build URL Parameter you will have the option to add static and dynamic values. 

 

facebook static dynamic parameters

 

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.

 

name based facebook parameters

 

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.

 

  1. Use the bulk export and import method via the Facebook Ads Manager.
  2. Build URL Parameters using the native Facebook Ads Manager Builder
  3. 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.

 

Google Analytics Google Ads report

 

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:

 

  1. Manual Cost Data Import
  2. Automated Cost Data Import

 

Once cost, impression and click data is imported we will be able to leverage the All Campaigns and Cost Analysis reports.

 

cost analysis and campaign google analytics report

 

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:

 

Tracking Facebook Ads in Google Analytics - Facebook Date Range

 

Select the Ads tab across the top and Go to Columns and Select Performance and Clicks:

 

Tracking Facebook Ads in Google Analytics - Facebook Breakdown

 

Customize columns and add Campaign Name, Ad Set Name, and Ad Name:

 

Tracking Facebook Ads in Google Analytics - Customize Columns

 

Click Breakdown > by time > Day

 

Tracking Facebook Ads in Google Analytics - Day Breakdown

 

Select the campaigns you would like to import and export these to a CSV file:

 

Tracking Facebook Ads in Google Analytics - Day Breakdown

 

Open the CSV and delete all columns except:

Day (Reporting Starts), Amount Spent, Campaign Name, Ad Set Name, Ad Name, Impressions, Link Clicks

 

Tracking Facebook Ads in Google Analytics - Excel

 

Once you have these cleaned up, head over to Google Analytics and go to Admin > Data Import

 

Tracking Facebook Ads in Google Analytics - Google Analytics 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.

 

Tracking Facebook Ads in Google Analytics - Data Import

 

Copy and paste the headers into your CSV respectively of column values.

 

Tracking Facebook Ads in Google Analytics - Data Import Schema

 

 

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:

 

Tracking Facebook Ads in Google Analytics - Excel Format Import Data

 

Go back to Data Imports in Google Analytics and click on manage uploads > Upload File and upload your CSV doc.

 

Tracking Facebook Ads in Google Analytics - Data Import

 

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.

 

google analytics cost analysis report

 

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

 

Campaign View

 

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.

 

google analytics campaign view

 

Cost Analysis View

 

The Cost Analysis View shows:

 

  • Cost
  • Impression
  • Click
  • CTR
  • CPC
  • RPC
  • ROAS 

 

and some primary on-site metrics for PPC campaigns. This allows us to track Facebook campaigns alongside user behavior data in one place.

 

google analytics cost analysis metrics

 

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.

 

Calculated Metrics

 

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

CP Goal

Goal Conversion Rate

 

Let’s get started…you can find calculated metrics in your Admin section

 

google analytics admin

 

Add a new custom calculation, call it CPV and define the formatting type as Currency (Decimal):

 

google analytics calculated metrics

 

Enter the formula and click Create:

 

google analytics calculated metrics formula

 

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.

 

Custom Reports

 

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

 

google analytics custom reports

 

Select a Flat Table and add:

Dimensions:

Campaign | Source / Medium | Ad Content

Metrics:

Impressions | Cost | Clicks | CTR | CPM | CPC | CPV | Session | Engaged Users | CP Engaged User | CR Engaged

 

google analytics custom reports metrics dimensions

 

Apply Filters as needed:

 

google analytics custom reports filters

 

Select your view:

 

google analytics custom reports views

 

Label the report and hit save.

You can now see all of your campaign platforms and on-site data in one place.

 

tracking facebook ads in google analytics - GA custom report

 

Tell us in the comments what you have done to make tracking Facebook ads in Google Analytics a seamless process?

Leave a comment

Your email address will not be published. Required fields are marked *