How To: Track Facebook Ad Goals with Google Analytics

gaFacebook Ads give marketers fantastic options for reaching their audience. And with their Offsite Conversion Pixels, you can track how your ads are performing, regardless of on which website your goals occur. Offsite Conversion Pixels tell you not only who has clicked your ads and then converted, but also whether users who viewed your ads have later converted.

The latter feature, View-Through Attribution, gives advertisers powerful insight into the full value of Facebook Ads. Both post-click and post-view attributions are tracked in 1-day, 7-day, and 28-day windows.

But what if you’re concerned with last-click attribution and want to know how many users completed goals directly after clicking a Facebook ad? And what if you want to track performance beyond 28 days? For that, you’ll need a different analytics solution.

One popular (and free) solution is Google Analytics. Over the years, it has developed into a robust and reliable way to track many aspects of a website’s performance. In this article, I’ll walk you through setting up a Google Analytics Goal for your website, and then creating Facebook Ads to drive conversions towards that goal.

Step 1: Pick your goal

Let’s use my company, adMixt, as an example. We want more companies to contact us about helping with their Facebook ads. We can run Facebook ads to any page on our site that might get a user’s attention. But the ultimate goal is to get them to visit our contact form and submit a request. To track that goal, we identify the page the user visits after completing the goal. In this case, it’s this link:

https://admixt.com/corp/?action=thanks

This is also the page where I would place my Facebook Offsite Conversion Pixel.

Step 2: Configure your goal in Google Analytics

When you log in to Google Analytics, you’ll be presented with a list of all your Accounts. Click the ADMIN button in the upper right corner, and then make sure the correct account is selected from the list on the left.

google analytics start goals

Now click on the Goals link on the list on the right.

Click the Create A Goal button and let Google guide you through the set-up process. In this example, we’re going to create an Inquiry goal and check the radio button next to Contact Us.

set up google analytics goals

Next we’re going to confirm that this is a Destination-based goal.

And lastly, we’re going to take the link we identified in Step 1 and enter it into the Destination entry field. Note that you don’t enter the full link. You enter the portion after the “.com”. In this case, we enter:

/corp/?action=thanks

goal setup google analytics

We click the Create Goal button, and this completes the process. Google Analytics now knows that whenever a user visits that link, a goal has been achieved.

Step 3: Set up your Facebook Ads

To run a campaign and measure your performance against this new goal, you will set up your ads just as you normally would. The important difference is to add extra parameters to your ad destination link to help Google Analytics differentiate between each of your ads. This is important so you can measure which ad achieved the most goals at the lowest price.

The way we do this is by adding tracking parameters called UTM codes to the end of the link. (Fun Fact: UTM stands for Urchin Tracking Module – Urchin being the company Google acquired in 2005 that became the basis for Google Analytics.) There are four main UTM codes we’ll work with for this type of campaign:

utm_source: The website the ads ran on. For this example, our value will be “Facebook”

utm_medium: The type of ad that ran. This could be “social”, “newsfeed”, “righthand”, “mobile”, or some other value you’d like to use.

utm_campaign: The name of your campaign. For example, “Contact Goal 1″

utm_content: The name of your ad within the campaign. For example, “Funny Ad” or “Serious Ad”

These parameters get strung together at the end of your URL like this:

utm_source=Facebook&utm_medium=righthand&utm_campaign=Gontact Goal 1&utm_content=Funny Ad

All of this gets added to your ad destination url like this:

http://admixt.com/corp/?utm_source=Facebook&utm_medium=righthand&utm_campaign=Gontact+Goal+1&utm_content=Funny+Ad

Google provides a free tool to help you build these links properly:

goal urls google analytics

You can measure goal completions using any of these UTM codes. As long as you differentiate at least one of them in each ad you create, you can measure your performance.

Let’s say I run two ads, sending traffic to a page on our website. I give each ad a different utm_content value.

utm_content=Serious+Ad

facebook ad serious

utm_content=Funny+Ad

funny facebook ad

After each ad spends $50 – $100, I look at Google Analytics and see which ad generates the most contact requests.

To view your performance, click on Conversion > Goals > Overview in the left-hand menu:

report goals ga

Then click on the listing for the Source / Medium report:

google analytics goal source

Next click the View Full Report link in the lower right corner.

This takes you to the main Explorer reporting window. From here, click on the Goal Set 1 link at the top to set your report columns:

set goals google analytics

Finally, set your Secondary Dimension to Ad Content. This allows you to see your data, grouped by the utm_content code you passed from your ads.

goals google analytics

Here we see that while the Funny Ad drove more visits, the Serious Ad had more than double the Goal Conversion Rate. This is a common trend. Ads that get a lot of attention don’t always attract the most qualified prospects. Often an ad with more limited appeal will drive better performance. This is a key reason why it’s dangerous to judge campaign success by click-through-rate, and why it’s so important to measure campaigns all the way through to a conversion event.

While this process might seem difficult to implement, it’s vital to properly measure your advertising investment. With the Facebook Offsite Conversion Pixel and Google Analytics, I get a complete picture of post-view, post-click, and last-click attribution for all my ads.

Stay tuned for part 2 of the post: advanced techniques for exposing even more valuable data!

Zach Greenberger

About Zach Greenberger

Zach Greenberger is the Founder and CEO of AdMixt, a Facebook Preferred Marketing Developer focused on performance marketing.
This entry was posted in How-To, Most Read, Reports. Bookmark the permalink.

15 Responses to How To: Track Facebook Ad Goals with Google Analytics

  1. Dan Wilkerson says:

    Nice post, Zach. I’m a big fan of Google Analytics and agree that you need to account for much more than simple CTRs to determine ad success. I sometimes feel Facebook is a bit manipulative in this sense, since they really put a lot of focus on metrics that are not always the best indicators of success, like reach or clicks.

    Thanks!

    Dan

  2. Zach Greenberger says:

    Thanks Dan. I know just what you mean. Have you seen the interface for the new ads reporting? I think Facebook has heard the frequent criticisms on these issues and is making great strides to address them.

  3. Instead of using the regular tagging tool, you might have fun with my Chrome extension that has a lot of cool features inside and does more then just tagging.

    https://chrome.google.com/webstore/detail/google-analytics-url-buil/gaidpiakchgkapdgbnoglpnbccdepnpk

  4. Joe anucha says:

    The best article for tracking Facebook with google analytics. Well explained sir! Thanks

  5. Kevin says:

    Thank you so much. This is EXACTLY what I was looking for. I’m trying to collect new contacts for my CRM. I’d really appreciate if you could answer a couple burning questions….

    1. Do I need to put the Google tracking code in my pages? If so, which ones? (I already have the Facebook Pixel on my thank you page).

    2. Do I need the utm variables on just my squeeze page, or also on the thank you page after it?

    Thanks again, Fantastic article!

  6. Glad you liked it, Kevin. I’ll try to answer your questions. If you need more help, you can contact me through admixt.com.

    1. You should have Google Analytics tracking code on every page in your site. As long as you’ve got that, GA will report on your visitor activity. The Facebook Pixel is just for measuring conversions. The GA code is for measuring everything, including conversions.

    2. You want to pass utm variables on any links leading to your site. Once the user lands on your site, Google Analytics remembers which utm parameters are attached to each user. So you don’t need to worry about passing those utm variables within your site. Only on the original link that got them to your site.

    Hope that helps.

  7. Zach, Great, helpful article as I am just now tackling all this for the first time. One thing confused me though – the final destination URL you showed after using the Google URL builder left off the “action=thanks” part of the original URL. Is that the way it should be? I would’ve thought it would all have to be there to give accurate results. Or does the question mark being in the original URL change the way it should be handled? We have a lot of .aspx pages on a site we manage that have a question mark near the end of the URL so i need to be sure I handle that properly.

    Keep up the great work!

    Carlin Stanton

    • Hi Carlin, good luck getting started.

      It’s important to recognize the distinction between your landing page and your confirmation page. The landing page is the one you want to attach the UTM codes to. That’s the user’s entry point into your site. Once you attach UTM codes to the link the user clicks, those follow the user around in Google Analytics as they navigate your site.

      The confirmation page is the one you define as your goal page. For my example, that’s the one with “action=thanks”. There’s no need to append UTM codes to that URL, and you would never want to link your users directly to your confirmation page, because that would bypass your your normal conversion funnel (the series of pages the user clicks through to convert).

      Regarding your comment about question marks:
      The question mark is the delimiter that separates your web page path from the url parameters. Everything before the question mark points to a specific page on your website. Everything after the question mark is a parameter that gets passed to that page. Depending on your site, each page will do different things with those parameters. Those parameters are in the format name=value and separated by ampersands. You want to make sure you don’t disrupt those values when you’re adding UTM tracking codes. The Google tool helps with that.

  8. Thank you sir! I appreciate the insight. Would love to know of any recommended reading on the subject. Glad I found your site today.

    Thanks again.

  9. Thomas Brandl says:

    Hi! Has anyone ever managed to track Facebook view-through conversions in Google Analytics? The missing numbers here are a huge blind spot in our channel attribution efforts.
    Would greatly appreciate any hint here!
    Thanks!

    • That is a great point, Thomas. Getting view-through data into Google Analytics would be fantastic. Unfortunately, Facebook has a pretty short list of approved view tag providers and last I saw, Google was not on there. In the big scheme of things, only Atlas (owned by Facebook) has the full functionally to measure view-through conversions across all media channels.

  10. This was a really helpful article. Thank you! I think Google has gotten better about explaining its Analytics services in layman’s terms, but they still fall into developer mode pretty often. As a non-developer, I appreciate the simplified, approachable language you used here. Keep it up!

  11. Could you please help me about GA.

    I need to know that how can I get the users details that those who are visiting my website through referrals.

    Is there any way to set tracking when a particular user visits my site through a defined website (say) http://www.xyz.com .

    Help me for the same , also to know more about Google Analytics Tools and there uses.

    Thanks ,
    Swapnil
    formget.com

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>