How to Track Campaigns with UTM Parameters in GA4

Cover image: How to Track Campaigns with UTM Parameters in GA4

If you run ad campaigns, you already know how important it is to track and measure what works. One of the best ways to get accurate data on your campaigns is to use UTM parameters in your links together with Google Analytics 4. Read on to learn how to use UTM parameters and Google Analytics 4 to measure every ad campaign you run.

What are UTM parameters?

UTM parameters are tags added to a link so you can track how a campaign performs. Here are the main ones:

  • utm_source - identifies where the traffic comes from, for example Facebook, Google, Instagram or your newsletter.
  • utm_medium - identifies the type of traffic, for example CPC (cost per click), email or organic search.
  • utm_campaign - names the ad campaign, for example Holiday Sale.
  • utm_term - optional; identifies the keyword that brought the visitor to your site.
  • utm_content - optional; lets you tell apart different versions of the same source and medium. Use it, for example, to see which ad variant gets more clicks.

You can add UTM parameters to any link. Instead of sharing a plain link to your website, add UTM parameters to it so you can see exactly where the traffic came from.

To create your own link with UTM parameters, you can use the free Campaign URL Builder from Google. We walk through it in our post UTM Builder: how to create UTM parameters for free.

The builder makes adding UTM parameters to a link easy:

  1. Open our post UTM Builder: how to create UTM parameters for free and follow the link to the builder.
  2. Enter the URL of your landing page, for example https://yourdomain.com
  3. Enter the campaign source, for example facebook
  4. Enter the campaign medium, for example cpc
  5. Enter the campaign name, using %20 instead of spaces and no special characters, for example Holiday%20Sale
  6. Optionally, enter the campaign content, for example Ad%20Variant%201
  7. Copy the generated link from the bottom of the page.
  8. If the link is long, you can shorten it with bitly.com.

Example of a link with UTM parameters:

https://yourdomain.com?utm\_source=facebook&utm\_medium=cpc&utm\_campaign=holiday%20sale&utm\_content=ad%20variant%201

Use that link wherever you send traffic (ad, email, post), and the campaign’s results will show up in your analytics.

How to measure ad campaigns in Google Analytics 4

Google Analytics 4 tracks traffic on your website and lets you analyze how users behave. Once you have generated links with UTM parameters and used them to promote your campaign, you can use Google Analytics 4 to see how the campaign performs. To do that:

  1. Sign in to your Google Analytics 4 account.
  2. Go to Admin in the left-hand panel and select the property you want to track.
  3. Go to Data streams and select the right data stream or add a new one.
  4. Click View tag instructions in the selected data stream.
  5. Open the Install manually tab.
  6. Copy the GA4 tracking code and add it to your website or mobile app.
  7. In Google Analytics 4, go to Reports in the left-hand panel.
  8. Choose the report you want to see, for example User acquisition or Traffic acquisition.
  9. Use the filters to display data for a specific campaign.

With these steps you can see which ad campaigns bring the most traffic, clicks and conversions, and use that information to optimize your campaigns and make your marketing more effective.

UTM parameters only keep your reports tidy if the whole team uses one naming convention. Without it, GA4 will show you fifty variants of the same name instead of five campaigns. We set that convention at the start of every marketing audit.