URL Parameters: how to prepare your Facebook ads for better Google Analytics tracking

You’re doing Facebook Campaigns for your WooCommerce site, you’re having a few nice ads running, you’re spending investing money and hoping for a healthy profit. But what is really going on with your campaigns? What  is your ROI, are you profitable, can you be more efficient? You definitely need to track your results to really understand if you’re marketing efforts are getting you in the right direction. You need proper tools, and the good news is that they are free and easy to integrate with your website. Read on!

How to use Google Analytics URL Builder (Facebook free tool)

Before we start with this tool it is important to say a few words about URL tags. This tags are appended to or will replace existing tags in your URLs. They are usually used to pass information, and in our case, they will be used to transmit crucial data to Google Analytics. They look something like this: http://www.example.com/some-page/?key1=val1&key2=val2

With the help of this tags, Google Analytics will be able to generate reports about the traffic coming from your ads, with data about Ecommerce conversion, Transaction Number, and Revenue.

How to generate parameters or tags with URL Builder

Go to the tool page: https://www.facebook.com/business/google-analytics/build-your-url

  1. Paste your URL and then add the necessary info:
  • *Campaign source: Facebook
  • *Campaign medium: Options are CPC, CPM or oCPM, depending on the way you’re optimizing your campaigns
  • *Campaign name: is better to use a short name
  • Campaign term: something to identify your audience
  • Campaign content: used to identify your ads


2. Click “Create URL” button

This will generate a new URL, like in the picture above. Copy what it is after the question mark.

How to use Google Analytics URL builder from Facebook

How  to add tags to your campaign URLs in Facebook Ads Manager

When you create your ads inside Ads Manager, under Text and Links section, click on the “Show Advanced Options” link, right after “Call-to-Action Button”. This will open a few more fields. Go to the last one, “URL tags”, and paste what you copied in the previous step.

This will add the tags to each URL in the ad. If you already have tags inside the URL, it will replace them.

Add ULR tags

Now your Google Analytics reports will show you more in-depth details about the traffic sources, and you will better estimate the results from your campaigns.

Have any questions or suggestions? Use the comments bellow to express yourself.

8 thoughts on “URL Parameters: how to prepare your Facebook ads for better Google Analytics tracking”

  1. I am trying to use this tools from analytics, but i am getting a hard time figuring out. Facebook ads manager is difficult, but google’s analytics is impossible. Cristian do you have a place where i can learn google analytics? (a blog, an online course, a document, etc)

  2. I am trying to tag urls for so called Dynamic Remarketing Ads, where as utm_content I would like to have value of dynamic variable {{product.name}}. However it seems Facebook does not pass value, and just do copy+paste.
    Can anyone explain if it’s possible to create UTM such as &utm_content=product.name with product name dynamically inserted based on what product user clicks?

  3. Will facebook apply the url/utm parameters to all the links on the post?

    For instance, if I have a link click ad will it is safe to say that the parameters will be applied to the url associated with the CTA button but will it also be applied to the same url if it just part of the text on the post? Also will it be applied to any comment links should you reply to someone of the posts comments? I’d like to track all link clicks on the post and I’m currently linking on those 3 places on my posts.

    Can’t find an answer to this anywhere. This could be a great article idea.

  4. It looks like facebook just released an update about their dynamic parameters. They provided a post with several dynamic parameters that you can append to your utm query strings. Makes your life much easier!


Leave a Comment