Google Analytics offers much more detailed data and insights into user behavior than Facebook, and allows you to easily compare performance with other channels. Of course if you are running Facebook Ads, you want to have their Pixel set up, to gather data and help their algorithm best target your ads to those users who are likely to convert. Without proper setup of Analytics, however, you won’t be able to differentiate your paid Facebook campaigns from non-paid, referral Facebook sources.

There are two options to properly set this up, and are found using the same steps. What we need to do is create a URL with campaign parameters that Google Analytics can read. These are called UTM codes, and let you gather detailed information about the traffic coming to your website for free.

utm codes to track facebook ads in analytics

Where to enter UTM codes in Facebook Ads

Setting up UTM Codes in Facebook Ads

This guide assumes you have already set up your Facebook Ads in the Ads Manager, and simply want to make sure  that the traffic coming from these ads is being properly tracked in Google Analytics.

First, you want to go to the Ads view as highlighted by the Red A above. From there, you need to click edit on the Ad you want to update. As you scroll down, you will see the destination settings for your ad as highlighted by the Red B. To monitor website traffic, you need to have your website as the destination.

From here, you can simply enter the URL of your choice, with UTM codes attached. Google offers a simple Campaign URL Builder tool to help you create custom URLs. You can also choose to use Facebook’s own tool, by clicking “Build a URL Parameter”, which will take you to the window highlighted by the Red C.

What Parameters Must Be Set?

You can get as creative and as granular with your parameters as you’d like, though it’s important to maintain a logical flow so that later when traffic does come into Analytics, you’ll be able to make sense of it. At the minimum, you will want to set:

Campaign Source: the source of your campaign, in this case Facebook. It seems counter-intuitive to include the source as Facebook, but if you do not, your other UTM codes may not register.

Campaign Medium: for paid ads, we use CPC. By using CPC as your campaign medium, Google Analytics will be able to group this traffic under “Paid Traffic”, letting you easily compare performance with other channels, and split it from your Facebook referral (organic) traffic.

Campaign Name: you can select a unique name for each ad running on Facebook, to help you identify which ads are performing best.

tracking paid traffic from facebook

Before and after applying Facebook as the source

What Can Go Wrong?

If you follow these steps and include at the minimum those three parameters, you should start receiving Facebook Ads traffic in Google Analytics, separate from your non-Ads Facebook traffic. We highlight the example above as why it is critical to include the Campaign Source as Facebook. We ran an A/B test, and found that without setting a campaign source, traffic was still identified as coming from Facebook, but grouped into referral, stripping both campaign medium and campaign name data. By adding the source, tracking returned to normal.

Join Our Community

Sign up and stay up-to-date with the latest digital marketing tips, tricks and news.

No spam, and we won't give your e-mail to anyone. We promise 

Thank you for subscribing to our newsletter!

Pin It on Pinterest