How To Track Facebook Ads in Google Analytics

Accurately tracking Facebook Ads in Google Analytics is now more important then ever.

With the upcoming iOS 14 update you can expect to see a 20% – 40% reduction of reported conversions in the Facebook Ads Manager.

To clarify, this does not mean Facebook Ads will become ineffective. However, it does mean that you need to diversify Facebook Ads Analytics and Google Analytics can be a great place to start.

In this post, we will show you how to set up Facebook Ad Tracking in Google Analytics so that you can analyze cost and session performance on the campaign, ad set, and ad level. If you are already tracking Facebook Ads in Google Analytics learn how to create detailed Facebook Ads Dashboards in Google Analytics here.


How to track Facebook traffic in Google Analytics


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 in one place leveraging calculated metrics and custom reports.


Analyzing performance holistically can be a daunting task. Given that Google Analytics and Facebook Ads don’t always play nicely together. However, as a data-driven marketer understanding campaign performance and efficiencies across platforms is critical.

In this post we explore a better way to track Facebook Ads in Google Analytics. But first, let’s take a look at current tracking challenges.


Tracking Facebook Ads in Google Analytics can be time consuming


Reporting on advertising works well within the confines of one specific ad platform.

Google products, for example, work well together. As a result, you can easily link Google Analytics (reporting) and Google Ads (advertising). Therefore, you can analyze performance data in a single reporting interface.

On the other hand, let’s take a look at Facebook. It has become a prominent advertising platform. But does not, like Google, have a diverse product stack.

Therefore, reporting outside of the Facebook Ads Analytics ecosystem is not that simple. For example, tracking Facebook Ads in Google Analytics.

Note: Facebook does provide a Facebook Ad Analytics Tool that is worth exploring. The standalone Facebook Analytics tool is no longer available as of July 1, 2021.

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.
  • Link Facebook Ads to Google Analytics with EasyAutoTagging.


These options, outside of using EasyAutoTagging, 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.



There is a better way to track Facebook Ads in Google Analytics


In this article, I will go over traditional UTM tracking methods and show you how to leverage three hidden Google Analytics features. The goal is to make tracking Facebook ads in Google Analytics easier for you.

Continue reading or jump to a specific section of this guide below:


  1. Data Import
  2. Calculated Metrics
  3. Custom Reports


It starts with proper Facebook Ad tagging


Let’s go back to the beginning and review some common ways Facebook marketers tag their Facebook Ads with UTM Parameters.

The best way to track Facebook Ads in Google Analytics is to create a defined UTM naming convention.

Subsequently, your naming convention can then be used to 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.

You can also leverage utm_term to pass the ad set name which populates the Keyword dimension in Google Analytics. In that case the UTM fields and their respective Facebook values look like this:


Campaign – “Campaign Name”

Source – “facebook” or “instagram”

Medium – “cpc”

Ad Content – “Ad Name”

Term – “Ad Set Name” (read audience)


Using the Google URL Builder


Many digital marketers use the Google Campaign URL Builder. The URL Builder generates UTMs to track Facebook Ads in Google Analytics.

Typically they look something like this:


Aside from the manual effort and time required, there is nothing wrong with this approach.


Build URL Parameters in the Facebook Ads Manager


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 to the bottom of an ad 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. Let’s take a closer look at dynamic vlaues.


facebook static dynamic parameters


Dynamic UTM Parameter 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.

Name based values are not accurate. 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 dynamic facebook parameters values


Custom Parameters are still a very manual process. 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.

Human error is a real thing. Relying on a human to make sure that every ad created on Facebook is properly tagged is something automation is better at getting right. You are also relying on the media buyer to make sure none of the nuances are missed.

Facebook’s UTM Encoding Method Doesn’t Mesh Well With Third-Party Analytics. By default, Facebook encodes spaces using a “+” symbol instead of the typical “%20” value. This means you have to clean your campaign data before integrating it into your third-party analytics platform.


A Better Way To Tag Facebook Ads With UTMs


The best solution for tagging Facebook Ads with UTMs is to combine automation, consistency and accuracy. We built EasyAutoTagging specifically for this reason.

With EasyAutoTagging you can:

Use Facebook’s dynamic {{site_source_name}} and {{placement}} values and get placement conversion breakdowns in Google Analytics.

Detect new ads automatically and auto assign pre-defined UTM parameters to the URL Builder tracking field.

Define UTM profiles on the account level and control tagging consistency across ad accounts and teams.

Have the flexibility to create any combination of UTM parameter definitions using standard, custom, and dynamic fields.

Leverage up-to-date dynamic name-based values and make sure to correctly capture the right information at the right time.



Three ways to tag your Facebook ads


There are three ways you can go about tagging Facebook Ads with UTM Parameters. These are ordered from most to least time-consuming.

  1. Manually create UTMs with the Google URL Builder.
  2. Use the native Facebook Ads URLBuilder.
  3. Use EasyAutoTagging to automate your UTM tagging process.

Now that we covered the proper application of UTM Parameters for Facebook Ads let’s look at importing cost data into Google Analytics.


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.


Cost data import


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.


cost analysis and campaign report



Option 1: 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. 

In addition, EasyAutoTagging 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 instance, 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.



Option 2: 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:

Facebook Ads Manager Date Range


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


Facebook Ads Manager Breakdown


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


Facebook Ads Manager Customize Columns


Then Click Breakdown > by time > Day


Facebook Ads Manager Day Breakdown


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


Facebook Day Breakdown


Lastly, open the CSV and delete all columns except:

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


Facebook cost data csv


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


Google Analytics Data Import


Now, 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


Next, 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


Reporting on Facebook Ads 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.

In addition, we can break down campaign performance down 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 


In addition, you will find primary on-site metrics for PPC campaigns. As a result, we can track Facebook campaigns alongside user behavior data in one place.


google analytics cost analysis metrics


To sum up, both of these Google Analytics reports, can already provide a wealth of insights.

Learn more about the cost analysis report here.

However, let’s take tracking Facebook ads in Google Analytics one step further using 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.

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%)


CP Goal

Goal Conversion Rate

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


google analytics admin


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


google analytics calculated metrics


Secondly, 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.

Learn more about calculated metrics here.


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.

So, let’s go ahead and set up a custom report.

First, go to Customization and click create a New Custom Report


google analytics custom reports


Next, 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


google analytics custom reports metrics dimensions


Now apply Filters as needed:


google analytics custom reports filters


And select your view:


google analytics custom reports views


Finally, label the report and hit save.

As a result, you can now see all of your campaign platforms and on-site data in one place.


facebook ads google analytics cost analysis report


Learn more about custom reports here. If you want to build a Facebook Ads Dashboard in Google Analytics reference this video:



How do you track Facebook ads in Google Analytics?

Let us know in the comments below.



Leave a comment

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

This is a great suggestion. My understanding of this is as below:
It shows the formula as COST/Sessions, so my understanding is that cost is added at creative level for each day of the campaign and I understand if you have auto-tagging enabled for standard and for 360 I can use Auto-Tagging override feature( Manual Tagging allows the website will be calculated as new session, which we want ), we will be able to connect /stitch session with costs ( as long as my parameters are correct)..
Is that correct? Please advise

My other question is as these are click thru based sessions, this will still not include Facebook impressions view-thrus data right, so no mention of Facebook ad in MCF reports ,etc
Please advise.


You are mostly correct here are a few notes for clarification:
1. You will be able to segment reporting on the creative level and see cost data as long as you are consistent with your UTM Parameters. (EasyAutoTagging has UTM Profiles to ensure consistency)
2. You can add custom parameters for additional breakdowns i.e. Ad Set but for some reason, GA does not map cost data down to custom parameters. (You can learn how to create custom parameters here) for that reason, if we want to see audience or ad set data we use utm_term (you can find it under the keyword dimension in GA) and cost data will map.
3. GA will automatically stitch cost, impression, and click data with session data at time of import. Again UTM Parameter consistency is key here.
4. We import cost, impression, and link click data. We do not import Facebook conversion data. This allows you to see the last click to lead/sale attribution since GA operates on a last-click model. Since we do not import conversion data you will need to use Facebook Ads Manager reporting if you want to include 1-day view through and 28-day post-click from the default Facebook attribution model. In our experience using Facebook’s reporting is good to directionally understand non-last click advertising impact whereas Google Analytics is better in understanding direct response daily money out and leads/sales in. You can read more on the reporting difference here


I was searching for a more convenient way of tracking my Facebook ads and then I found your blog. Thanks for sharing this amazing article.


Amazing article, thank you!

Can we track opt-out’s users in GA?


Yes, you can still track session data in Google Analytics even if users opt out of tracking. You can read more about the Facebook iOS14 Privacy update and how it affects Facebook Ads here.