Using Google Sheets to Scale Your Facebook Ads UTMs

3 min read by Josh Crawford 3 Oct 2022

UTMs are URL parameters that allow you to tag traffic that visits your website through a particular link – performance data for a UTM set can then be analysed within Google Analytics. And with iOS 14 – arguably, it has never been more important to be using campaign tags for your Facebook Ads activity.

However, with complex ad account structures and the number of individual ads easily reaching the hundreds, producing unique UTMs at scale is a lengthy process. With a few formulas in Google Sheets – we can make this process a breeze.

Step 1:

To get started, go to Facebook Ads, select the campaigns to build UTMs and click export > Export as CSV.

Step 2:

Create a copy of the Google Sheet builder. File > Make a copy.

Step 3:

Import the CSV exported from Facebook Ads. Select the ‘Import’ tab and then click File > Import. Select ‘Upload’ and drag across the CSV.

Change the Import location to Replace Current Sheet and click Import.

Step 4:

With the ad structure imported, switch to the reference tab. You should then see a breakdown of the account structure across Campaigns, Ad Sets and Ads.

For each entry returned, add a value in the shortcode column.

Campaign shortcodes will populate utm_campaign, Ad Set and Ad shortcodes will populate utm_content, split by ‘—-’. Ensure only valid HTML characters are used.

Step 5:

After adding all shortcodes, the next step is to update the structure in the Import tab.

Copy cell F4 within the References tab. Note the column referenced in D4.

Now go to the Import tab, and scroll to the column referenced in D4. Select the second row in the column, press ‘=’ to activate the cell and then press CMD+V or CTRL+V (you must paste using this method or it will not function properly).

Using the blue marquee, drag the formula to cover all rows.

Step 6:

Go to File > Download > CSV to export the adjusted structure to Facebook Ads.

Step 7:

Re-import the exported file back to Facebook Ads.

And that’s it – super simple. You’ll now be able to track and analyse your Facebook Ads at a granular level.

Here’s an example of how we have utilised this additional level of data – performance analysis across targeting through effective naming.

If you’d like us to help you with tracking and improving your paid social performance, get in touch today!

Let's talk strategy
Drag Read