Tracking Facebook Ads in Google Analytics

Tracking Facebook Ads in Google Analytics

Let’s say you have a website connected to a Google Analytics (GA) account. And you also have a really good Facebook ad campaign, which means it’s not the cheapest. People click on your ads, visit your site, buy or leave. However, how can you get more information about their Facebook and website activities? A common way is to collect customer behavior data on your Facebook and Google Analytics. Here are a few reasons why you can ask yourself about analytics right now:

  • Facebook can only show you what happened before the ad was clicked. And this data is not as reliable as it should be;
  • Google Analytics displays what happens after visitor clicks on an ad and tells you who visits your site from social networks;
  • Google Analytics displays all of your channels so you may analyze and compare them.

That’s why Google Analytics is the most popular Facebook advertising campaign tracking platform. So let us provide you with how to combine these two systems in one digital analytics tool.

Why Facebook Ads Should be Tracking in Google Analytics

1. Tracking Facebook ads in Google Analytics is a great idea if the statistics from different sources are not aligned – for example, if you find problematic data in Ads Manager and Google Analytics that do not match anything. The discrepancies between the data from Facebook and Google Analytics are due to different approaches to tracking and some other technical factors. Cleverly combining all the analytical tools we have is the only way to get data on what users do before and after clicking on ads.

2. Tracking Facebook advertising campaigns in Google Analytics is critical to researching your overall marketing costs and calculating your return on ads spend (ROAS). You can assume that in some way you can improve your advertising on social networks, but you do not have data that you could rely on in your ratings.

3. Tracking Facebook advertising data in Google Analytics is a good idea if you’ve started your journey from an SMM specialist to an analyst and decided to begin by analyzing Facebook data.

Differences Between Facebook Insights and Google Analytics

Before comparing ad performance across two platforms, make sure your Facebook conversions are defined in the same way as your goals in Google Analytics, and that all of your ads have the correct URL parameters. Even if your conversions are defined the same way and the tracking parameters are correct, you’ll still see differences when comparing advertising performance with Facebook Insights and Google Analytics.

The main reason for the discrepancy is that Google Analytics and Facebook use different marketing attribution models. By default, Facebook provides an advertising score for all conversions that occur within 28 days after a click on an ad or within one day after viewing an advertisement, regardless of any other channels with which the user could interact after advertising on Facebook. You may read more on Facebook attribution. Google Analytics, on the other hand, will assign conversion credit to the last touch, which includes all channels, not just Facebook, by default. Besides, Google only considers Facebook traffic if the user clicked on an ad and not just viewed it. For these reasons, Facebook is more liberal in its performance calculations.

What Do I Need to Do Before Start Tracking the Facebook Ads

To start tracking Facebook ads in Google Analytics, you need to make sure that each page has the GA or GTM tracking code that you want to monitor. Besides, administrator rights are required for all your Google Analytics activities.

Keep in mind that with Google Analytics you can only track your campaigns, pages, and actions in your account, which are closely related to your website. For example, you can’t say exactly what people are doing before clicking on the link to your site. But you can set the Facebook Pixel to track the cost of events on the Facebook side. Also, you may set goals and conversions in GA. Keep in mind that both of these platforms have the same settings. This is necessary for the further import of data and combining them into one database. You also need to prepare an advertising campaign on Facebook and set it up specifically for GA:

  • Collect all the URLs and links that you will use in your campaign;
  • Fill them with UTM parameters to mark them uniquely;
  • Paste these URLs into your campaigns.

UTM options are key to working with various types of Facebook advertising campaigns. If you create the UTM correctly, the data will be marked correctly and you will receive the necessary reports.

Collect All the URLs and Links that You will Use in Your Campaign 

To get started, use a spreadsheet (Excel, Google Sheets, LibreOffice Calc, etc.). Put all the necessary URLs in one column and make sure that they lead to your site with Google Analytics installed. You can also include other items besides the URLs that you need to track for your ad campaign. Add the Visit Website button or the URLs of your main web page to the information block of your business page. All of these URLs will look like Facebook entry points to your site where Google Analytics will collect traffic data. 

LinkSourceMediumCampaignTerm (optional)Content (optional)Ready-to-use link

Complete Link with UTM Parameters

Finally, we will explain what UTM is! You saw it as a long tail or URL text when you clicked on ads and went to another page. UTM code means the Urchin Tracking Module. This is fine if you don’t remember the Urchin Tracking Model, but you must remember that UTM’s provide a universal way to track your links.

You use UTM to tell you exactly where the traffic from the website comes from: for example, the email that has been clicked on, which advertising campaign they converted to, which of your marketing efforts bring the most traffic.

So what information can be included in a UTM URL? Here is a table displaying the types of UTM parameters:

Sourceutm_sourceWhere does your traffic come from
Mediumutm_mediumThe platform that you are using
Nameutm_campaignThe marketing campaign of this message
Term (optional)utm_termThe term you’ve set in an advertising campaign
Content (optional)utm_contentWhere this link leads to

This is enough to track even in the most complex campaigns on Facebook.

  1. The source for a Facebook campaign is usually set as “facebook”.
  2. The medium for a Facebook campaign can be “CPC” if it’s a paid advertisement, or “social” if it’s organic on Facebook.
  3. The name of the campaign you must choose for yourself. But keep in mind that URLs are case sensitive and you may not remember what they mean. Therefore, pay attention to the names of advertising campaigns.
  4. Terms and content are optional and are used primarily in Google’s advertising campaigns.
Complete Link with UTM Parameters

The Simplest Method to Track Facebook Advertising Campaign via Google Analytics

Let’s assume that the UTM phase is complete. Next steps:

Open your Google Analytics account. Navigate to the Acquisition → Campaigns → All Campaigns section.

track your visitors on google analytics

Then filter the view by the primary dimension Source/Medium. Or use the small search line and enter the Campaign Name that you used in your UTM tags.

You may also create a segment or user filter for campaigns on social networks or see how people lead to placing an order in the  Acquisition → Social → User Flow section.

You may create a simple custom filter that contains just incoming Facebook traffic. This will help you break the data and make it easier to get through it. Keep in mind that filters at the property level will ignore data that does not match this filter, and that you will lose the filtered data in this property. So it’s better, safer, and easier to use segments.

track facebook users on analytycs

In the section Acquisition → Social → Conversions → Facebook → Assisted vs Last Interaction Conversions you can also find some ideas.

But without the next integration of cost data, you won’t be able to see a significant portion of the results of your ads, because you won’t see your profitability. So, let’s get a little deeper into ROAS calculation by importing cost data.

Set up Your Facebook Cost Data Tracking in Google Analytics

There are two ways to go. You can configure it manually or get the help of professionals. By choosing manual tuning without preparation and a full understanding of the process often leads to errors in reports and additional problems.

1. Let’s see how we can manually track Facebook’s cost data in Google Analytics.

Open your Google Analytics account and navigate to the Acquisition → Campaigns → Cost Analysis Report section.

goal analytics on ga

Then filter by facebook in the search bar and see your campaigns for a certain period. If you have zeros with some campaigns it’s okay, even if they are pretty depressing. These are campaigns that you need to enrich with cost data.

2. Now navigate to Admin → Property → Data Import.

set your goals in ga

This is the place where you can add cost data

3. Click the Create button

step 2 in setting goal

Now, you have to be in the Data Set schema settings. Select Cost Data. Name it and select the views in which you want to implement this part of the cost data. The next step displays the requirements for the data scheme, which should be in a spreadsheet that must be prepared for proper operation.

step 3 in setting goal

As you may see, the date, medium, and source should be listed in your import table. You have also added cost, clicks and impression lines in any combination. You may add additional fields at the bottom of the settings. Choose Import Behavior from the Summation or Rewrite data uploading rules.

4. After you have changed the settings, your new data schema will appear in the main menu of Data Import. You are now ready for uploading from the Google Analytics side.

5. Press the Get Scheme button

getting data from ga

It will download an Excel template.

6. This is how the downloaded template looks like:

facebook ads template

And the most interesting thing is filling up these columns.

7. Open Ad Manager or Facebook Pixel. Check the date period: it should match the one you selected in your Analytics profile. To properly populate our data schema, we need to break the data by day, since we have a ga:date column. Then export the data to .csv format.

ad manager on facebook

8. Open your Facebook data file in a new spreadsheet and you will get something like this:

downloaded facebook cost data in a table

9. Transmit the data from this Facebook file into the Google Analytics schema file. Make sure all columns are filled correctly. You may see the Google Analytics source and medium in the Google Analytics descriptions. It’s always the same thing – the source is, and the medium is the cost-per-click for advertising campaigns. Cost data is the amount that has been spent. And unique clicks are displayed in the click column. 

If something goes wrong, Google Analytics will send you an error message. Or two dozen. Who knows?

10. Export the spreadsheet file also in .csv format. Now go back to the Data Import Data menu in the Admin section and click the Upload File button. Download the spreadsheet file you just exported and wait for it to be checked.

11. Now Google Analytics will show you what is wrong. Edit the requested columns if they do not allow you to continue. Once you upload the file without errors, Google Analytics will process your data throughout the day.

12. If you did everything correctly, you’ll get back to where you started.

analyze facbook data on ga

This is a way how you can import your Facebook advertising costs into Google Analytics.


No matter how good Facebook advertising campaigns analytics are, nothing could be better than Google Analytics when it comes to full tracking and understanding conversions, from the initial delivery and the path that the user went through to the conversion. The more you can understand why conversions occur, the more you can optimize your campaign, and also see how each campaign fits into the big picture.

Track Your Facebook Campaign in Google Analytics with Dewzilla

Tracking Facebook ads in Google Analytics it’s a complex process, that requires some time and effort, so relying on the professional team – great decision. Dewzilla is exactly that company, which knows how to track your Facebook advertising campaign and what to do to improve the results of your business. Our experienced marketers will analyze each stage of your campaign and provide you with the smart solutions of your “weak” sides. By analyzing the GA reports they will understand what works and whatnot. Since that, the main efforts and money will be concentrated on the most effective ways that lead to conversions. Also, Dewzilla will bring more traffic to your website and increase your business awareness.     

Contact us and our managers will provide you with all the details 


(447) 366-491-118    

Have questions?

Project Manager

Hello, how may I help you?

Unfortunately nobody is available currently :(

We will get back to you shortly!