• Courses
    • Courses
    • Course bundles
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login
  • Courses
    • Courses
    • Course bundles
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login

May 5, 2025

How to track campaigns in Google Analytics 4

Understanding the effectiveness of your marketing campaigns is important. When you invest time and money into driving traffic to your site, you need to ensure that it’s paying off.

If you’re reading this, you may wonder, “What’s a marketing campaign, and can it drive business to my site?” While I won’t go through the details of running a marketing campaign, I will (briefly) explain what marketing campaigns are and mainly focus on showing you how to track campaigns in Google Analytics 4.

Subscribe and Get the Ebook - working with reports in ga4

Table of Contents

Here’s what you will learn in this article

  • What are marketing campaigns?
  • How GA4 tracks traffic sources and attributes sessions
    • Google ad click identifiers (e.g. gclid)
    • Referral data
    • UTM parameters
  • A closer look at UTM parameters
  • Organizing your UTM parameters
  • How to add UTM parameters to links
  • How to find campaign data in GA4
    • Standard built-in reports
    • Explorations
    • Advertising reports
  • UTM Parameters are not working in GA4
  • Final Words

 

What are marketing campaigns?

If you’re new to the business or haven’t run any marketing campaigns before, this may be a new term for you (or you refer to it as something else).

Basically, these are coordinated activities to promote your product. You can’t always rely on word of mouth or people knowing your brand, so you must reach out using other means. The ultimate goal is to get a user to purchase your offering.

Some marketing campaigns include purchasing ads on social media sites or working with influencers to promote your product. Regardless, this is a cost that you will incur, so you need to know the return on your investment to see if it’s worth it.

 

How Google Analytics 4 tracks traffic sources and attributes sessions

GA4 offers multiple ways to track traffic source and attribute sessions, including Google Ad click identifiers (e.g. gclid), referral data, and UTM parameters.

If these are not available, the traffic source is considered direct. You may think this means a user typed or copied the URL directly into the search bar to reach your site, but unfortunately, it’s more nuanced than this.

Luckily, I have an article on direct traffic for you to explore the topic more in-depth since it’s not exactly as it seems.

But let’s look at those three methods first!

 

Google ad click identifiers (e.g. gclid)

When a user clicks on a Google Ads ad, GA4 receives a unique identifier called a gclid contained in the page URL and the referrer (e.g., google.com) (which we will discuss more in the next section). This allows GA4 to attribute a session to the specific Google Ads campaign from which the user landed on your site.

Google has an article on how to tag your Google Ads final URLs if you want to use and track the success of Google ads in your marketing campaigns.

 

Referral data

Perhaps you have a campaign on a 3rd party website, such as a blog. In this case, you can use the referral data from GA4 to see what sites users were on before landing on yours.

To find which sites are directing traffic to yours in GA4, you can check a few different areas for the data. However, it’s not super intuitive.

If you just want to take a quick look at your referral data, you can use the built-in Acquisition reports.

In GA4, go to Reports > Acquisition > Traffic Acquisition (this may look different in your interface since this section is customizable).

In the detailed table, add the Session source as a second dimension.

Search “Referral” to filter only by the referral traffic. Due to increased browser privacy protections, you can only see the domain of the 3rd party site, not the entire URL.

If you want a more permanent method to see this data, check out my article on how to find referral traffic data in GA4 for more options!

 

UTM parameters

UTM parameters are a very easy way to track the success of your campaigns. In a nutshell, these parameters provide additional information you can add to links to your site.

Think of them as little ‘digital breadcrumbs’ you attach to your links. When someone clicks that link, these breadcrumbs tell Google Analytics exactly where that visitor came from. It’s like asking each visitor, ‘Hey, how did you hear about us?’ but in a much more automated and precise way.

For example, if you’re setting up ads for social media, you’ll be asked where you want the user to be directed to when they click on the ad, so in the URL, you can add UTM parameters, e.g. www.website.com/?utm_source=facebook&medium=paid_social&campaign=end_of_summer_sale

For more information on the purpose of each parameter, how to add them to a URL and how to find the data in GA4, check out my guide to UTM parameters in Google Analytics 4 (we will go over some of the most important points of this article in the next section).

No matter what, you should use UTM parameters to track your campaigns. Even if you use Google Ads with auto-tagging, you should still use UTM parameters. If, for whatever reason, GA4 does not fetch the campaign data with the help of gclid, UTM parameters will be a safe fallback. It is better to be safe (and have too much data) than sorry.

Subscribe and Get the Ebook - 20 GA4 mistakes

A closer look at UTM parameters

While I have an entire article focusing on UTM Parameters in GA4 (which you should eventually check out to get the full picture), we will cover some of the article’s highlights.

The classic UTM parameters are utm_source, utm_medium, utm_campaign, utm_term, and utm_content. There are more (others that you can read about here), but these five are the most common. When adding UTM parameters to links, you should always include the utm_source, utm_medium, and utm_campaign.

The table below outlines the purpose of each of the parameters.

  • utm_source – Name of the referrer/traffic source. For example, youtube.com or a specific newsletter
  • utm_medium -type of marketing medium. E.g., email or cpc
  • utm_campaign – The particular campaign you are running. E.g., black-friday or boxing-day-sale
  • utm_term – If you manually tag paid keyword campaigns, you should use this parameter to identify paid search keywords.
  • utm_content – This parameter is helpful when the same campaign is run across multiple locations, leading to the same link to compare which does best. For example, if you have the same email campaign but use different photos in the email, you can use the utm_content parameter to distinguish between the two emails.

Check out this article to learn more about building URLs with UTM parameters.

 

Organizing your UTM parameters

If you’re running many campaigns or have multiple people in your business creating campaigns (or both), it may get overwhelming quickly!

You should manage the UTM parameters you use in a single place or a specialized tool like utm.io to access all campaign information quickly and ensure consistent naming conventions.

Google Analytics 4 is case sensitive, so if the utm_campaign is “black-friday” that will not be the same as “Black-Friday”, displaying in two separate rows in a report. So, having some pre-defined naming conventions (E.g., always use lower-case) that everyone can see and follow will be helpful.

 

How to add UTM parameters to links

UTM parameters are customizable, so you can choose the naming convention that best suits your needs. You can add these parameters to any links across all campaigns, including email, affiliate, and social media.

First, you will want to determine which page on your site the campaign will link to. Let’s say the page we want to link to is www.yourwebsite.com/new-product.

You will add a question mark (?) to the end of the link, which designates parameters in the URL. Following this, you will begin with your first UTM parameter. Each proceeding parameter will start with an ampersand (&).

Suppose the URL already has some parameters. In this case, place an ampersand (&) at the end of the existing parameters and then add the UTM parameters separated by ampersands.

Check out the Google campaign URL builder if you need help building URLs with UTM parameters.

After inputting your UTM parameters, the tool will output your completed page URL!

Once your campaigns with these links are live, you need to wait 24 hours, and you’ll start to see the data coming into Google Analytics 4.

If you have issues with your UTM parameters, you can read this article on UTM parameters not working in Google Analytics 4. We will go over one of the solutions later in this article, so keep reading to learn more!

Subscribe and Get the Ebook - Mastering GA4 event tracking

How to find campaign data in GA4

Ok, “Where exactly can you see this data?” you ask; let’s take a look!

 

Standard built-in reports

First, we’ll start with a simple report showing users who have come from your various campaigns. To do this, we’ll use the built-in Acquisition reports (which are, as you can see).

The two reports of interest are the Traffic acquisition and User acquisition reports. Depending on if you are using the Traffic Acquisition report or the User Acquisition report, there are different dimension names used in the report. See the list below for an overview.

  • utm_medium: use Session medium in Traffic Acquisition reports or First user medium in User acquisition reports.
  • utm_source: use Session source in Traffic Acquisition reports or First user source in User acquisition reports.
  • utm_campaign: use Session campaign in Traffic Acquisition reports or First user campaign in User acquisition reports.
  • utm_term: use Session manual term in Traffic Acquisition reports or First user manual term in User acquisition reports.
  • utm_content: use Session manual ad content in Traffic Acquisition reports or First user manual ad content in User acquisition reports.
  • utm_id: use Session campaign ID medium in Traffic Acquisition reports or First user campaign ID in User acquisition reports.

In general, “Session” dimensions are found in the Traffic Acquisition report & ”First user” dimensions in the User Acquisition report. If you’re unsure which report best suits your needs, check out the blog post about User Acquisition vs Traffic Acquisition.

Ok, with that background info in mind, let’s head back to the interface. Go to Reports > Acquisition > Traffic Acquisition (or User Acquisition) in the interface. If you’re unsure which report best suits your needs, check out the blog post about User Acquisition vs Traffic Acquisition.

Since the sidebar of GA4 is customizable, your version may look different from the screenshot provided, so the report may be in a different location.

Here, you can choose the parameters that you are interested in. Add a primary dimension from the dropdown and a secondary dimension by clicking the plus sign (+).

The Session source/medium and Session campaign are a simple place to start since you must include these three parameters in the URL. You can see various metrics associated with these parameters, like users, sessions and total revenue.

Check out the guide to Acquisition reports in GA4 to learn more about how to use these reports!

 

Explorations

If you want more information, such as the number of purchases and the revenue gained in sessions where a campaign drove traffic, you can create an exploration. Explorations in GA4 allow you more freedom to create a report suited to your exact needs.

For this report, you will need to have the purchase event implemented. You may also choose to use a different key event, which is ok!

In the interface, go to Explore and select a “Blank” exploration.

In the report, load in the Dimensions and Metrics below (other than Event name), and double-click to add to the report.

  • Dimensions: Session source / medium & Event name (we will use this to filter so it doesn’t need to go into the report)
  • Metrics: Event count & Purchase revenue

For the filter, drag in the Event name and set it to match “purchase”.

Optionally, you can filter by a specific source, medium or campaign to see information on just one or a few marketing campaigns. In this case, I wanted to see how newsletters perform against each other.

 

Advertising reports

When you enable Google Ads in Google Analytics 4, you can access the Advertising reports under Reports.

One of the available reports is called the Attribution models report. This report allows you to see how different channels (e.g., paid ads, social media) work together across the users’ journey.

You can also compare the effectiveness of various campaigns by seeing how they contribute to conversions under different attribution models. You can learn more about attribution models here.

Subscribe and Get the Ebook - Server-side tagging

UTM Parameters are not working in GA4

I have written an entire article on solutions for when UTM parameters are not working in Google Analytics 4.If you review the article, you may get discouraged seeing all the ways that GA4 may not capture UTM parameters. But you shouldn’t! Let’s go through one example of how you can still get the information you need.

UTM parameters appear in the URL, right? We also capture the URL with every page_view event. So, it seems that we can retrieve the UTM parameters from the page URL!

For example, we can create a funnel exploration and set up the first step as a page_view with a page URL containing any UTM parameter (or a specific one), and then the second step is the purchase event.

Under the Explore section of GA4, select “Blank report”.

Change the Technique to “Funnel exploration”.

Select the pencil icon next to Steps to add the necessary steps to the funnel.

How you define each step is completely up to you. For this example, I did the following:

  • Step 1: For the first step, I wanted to filter the users by just those who have landed on my site through a newsletter. Since I know the UTM parameters will be in the URL, I filtered the page_view event by the page_location dimension.
  • Step 2: Here, I’m seeing how many users made a purchase after coming from a newsletter.
  • Additionally, I set a time constraint between the two steps. Otherwise, the funnel will include any user that came from a newsletter and then made a purchase later in the period (which is 28 days by default), which I don’t find very helpful when attributing a purchase to a campaign. The time constraint I used was 30 mins, but you can make it shorter or longer.

Now, even if users click on a newsletter link mid-session, you can still see the UTM data and attribute it to a key action.

 

How to track campaigns in Google Analytics 4: Final Words

Whether you’re an expert marketer or just starting out, I hope this article helped demonstrate how you can measure your ROI effectively. Running campaigns can be challenging, so it’s important to ensure that your time and money are well spent.

One way to determine the ROI is using GA4 to track your campaigns’ performance.

While there are various methods to measure the success of your marketing efforts, I suggest you always use UTM parameters as either the primary tracking approach or a backup for other methods (even with their faults, they are powerful).

If you have additional tips for measuring campaign success, feel free to share them in the comments below!

 

Julius Fedorovicius
In Google Analytics Tips
0 COMMENTS

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *


 

Hi, I'm Julius Fedorovicius and I'm here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey. Read more
Analytics Mania
  • Google Tag Manager Courses
  • Google Tag Manager Recipes
  • Google Tag Manager Resources
  • Google Tag Manager Community
  • Login to courses
Follow Analytics Mania
  • Subscribe to newsletter
Recent Posts
  • Setting up cookie consent for Microsoft Clarity (V2)
  • Conversion rate in Google Analytics 4
  • Google Tag Manager Data Layer Explained
Analytics Mania - Google Tag Manager and Google Analytics Blog | Privacy Policy
Manage Cookie Settings