How to Set Up a Campaign in Google Analytics

Cody Schneider8 min read

If you're launching marketing campaigns without a way to measure them, you're essentially flying blind. To get a clear picture of what's working and what isn't, you need to track your campaign performance directly within Google Analytics. This guide will walk you through exactly how to set up campaign tracking using UTM parameters, turning your vague traffic data into clear, actionable insights.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why Bother Tracking Marketing Campaigns?

You might be getting traffic from your social media posts, email newsletters, or paid ads, but Google Analytics often groups this valuable traffic into vague buckets like "Direct" or "Referral." Without proper tracking, you can't distinguish which specific tweet, email, or ad is responsible for driving visits, sign-ups, or sales. This is a huge missed opportunity.

Imagine you run a three-day flash sale. You promote it on an Instagram story, in your weekly email newsletter, and through a paid Facebook ad. On Monday morning, you log into Google Analytics and see a huge traffic spike. That’s great, but where did it come from? Which channel was the hero?

  • Was it the email that drove the most engaged buyers?
  • Did your Instagram story generate brand awareness but few sales?
  • Did the Facebook ad have the highest return on investment?

Without campaign tracking, these questions are impossible to answer. All you see is a lump of undifferentiated traffic. By setting up tracking, you assign a unique identity to the traffic from each of your marketing efforts. This allows you to measure performance accurately, calculate the return on investment (ROI) for each campaign, and make smarter decisions about where to allocate your time and budget.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

The Core of Campaign Tracking: UTM Parameters

The magic behind tracking campaigns in Google Analytics lies in something called "UTM parameters" (Urchin Tracking Module). That name sounds technical, but the concept is very simple. They are just short text tags that you add to the end of your URLs. When someone clicks a link with these tags, they pass information to Google Analytics, telling it exactly where the user came from.

An example URL without UTM parameters looks like this: https://www.yourstore.com/products/summer-collection

The same URL with UTM parameters might look like this: https://www.yourstore.com/products/summer-collection?utm_source=facebook&utm_medium=social&utm_campaign=summer_sale_2024

See those extra bits starting with ?utm_? Those tags tell Google Analytics that the person who clicked this link came from Facebook, via a social media post, as part of your "Summer Sale 2024" campaign. There are five UTM parameters you can use, three of which are required for effective tracking.

1. Campaign Source (utm_source) - Required

This tag identifies where the traffic came from. Think of it as the specific platform or website sending you visitors. Being consistent and specific is important.

  • Examples: google, facebook, newsletter, instagram, influencer_name

2. Campaign Medium (utm_medium) - Required

This tag identifies the marketing channel or medium you used. It’s broader than the source.

  • Examples: cpc (for cost-per-click ads), email, social, affiliate, display

3. Campaign Name (utm_campaign) - Required

This tag identifies the specific promotion, sale, or strategic campaign you're running. This is what allows you to group all related marketing efforts together.

  • Examples: summer_sale_2024, q4_promo, new_product_launch

4. Campaign Term (utm_term) - Optional

This is primarily used for paid search campaigns to track the specific keywords you're bidding on. If you link your Google Ads account to Google Analytics, this is often handled automatically, but you can use it for other ad platforms too.

  • Examples: eco_friendly_tote_bags, boston_data_analytics_course

5. Campaign Content (utm_content) - Optional

This parameter is incredibly useful for A/B testing. If you have multiple links within the same email or ad that point to the same URL, utm_content helps you differentiate which specific link was clicked. This tells you what copy, images, or calls-to-action resonate most with your audience.

  • Examples: hero_image_button, bottom_text_link, blue_ad_creative_v1
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

How to Build Your Campaign URLs with UTM Parameters

Manually typing out these long URLs is tedious and prone to typos that can corrupt your data. Fortunately, Google provides a free and simple tool called the Campaign URL Builder that does all the work for you.

Here’s how to use it, step by step:

  1. Open the Tool: Navigate to Google's Campaign URL Builder for GA4.
  2. Enter Your Base URL: In the "Website URL" field, paste the full URL of the landing page you want to send traffic to. For example: https://www.myonlinestore.com/weekly-specials.
  3. Add Your Source, Medium, and Campaign Name: Fill in the required fields: campaign_source, campaign_medium, and campaign_name. Let's create a URL for a promotional email campaign.
  4. Add Optional Parameters (If Needed): If you are running an A/B test in your email, you might fill in campaign_content.
  5. Generate and Copy Your URL: As you fill in the fields, the tool automatically generates the final campaign URL at the bottom of the page. It will look something like this: https://www.myonlinestore.com/weekly-specials?utm_source=newsletter&utm_medium=email&utm_campaign=weekly_special_june_2024&utm_content=header-button

Now, just copy that full-generated URL and use it as the hyperlink for the header button in your weekly email newsletter. That’s it! Any traffic that comes through that specific click will be perfectly tagged and categorized in Google Analytics.

Best Practices for Flawless Campaign Tracking

Setting up UTM parameters is easy, but keeping them organized and consistent is what separates good data from great data. Follow these best practices to ensure your tracking is always accurate.

1. Be Ruthlessly Consistent with Naming

Google Analytics is case-sensitive, which means Facebook, facebook, and FB will show up as three separate sources in your reports. This splinters your data and makes analysis a nightmare. The best practice is to decide on a naming convention and stick to it.

  • Always use lowercase: It’s the simplest way to avoid case-related issues.
  • Use underscores or dashes instead of spaces: Use summer_sale instead of summer sale.
  • Create a naming convention document: This can be a simple spreadsheet that your entire team can reference. For example: always use facebook, instagram, linkedin, and twitter for social sources.

2. Keep a Log of Your Campaign URLs

Don't create campaign URLs on the fly and forget them. Keep a shared spreadsheet (like Google Sheets or Excel) that logs every single UTM-tagged URL you create. This not only enforces consistency but also gives you a historical record of all your marketing activities.

Your tracking sheet should include columns for:

  • Date created
  • Team Member
  • Campaign Name
  • Source
  • Medium
  • Content (if used)
  • The final generated URL

3. Never, Ever Use UTMs on Internal Links

UTM tags are for tracking traffic coming to your site from external sources. You should never use them on links within your own website (e.g., a link on your homepage to your blog). Using UTMs internally will overwrite the original source data for a visitor's session. For example, if a user arrives from an organic Google search and then clicks an internal UTM-tagged link, Google Analytics will forget they came from organic search and start a new session, attributing them to the internal campaign instead. This seriously inflates your session count and breaks your attribution reporting.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Where to Find Your Campaign Data in Google Analytics 4

Once you’ve built your URLs and launched your campaign, where do you find the results in GA4?

Follow these clicks:

  1. Log into your Google Analytics 4 property.
  2. On the left-hand navigation menu, go to Reports.
  3. Under the "Life cycle" section, click on Acquisition, then select the Traffic acquisition report.

By default, this report shows traffic grouped by Session default channel grouping. To see your campaign data, you need to change the primary dimension.

  • Click the dropdown arrow next to "Session default channel grouping" at the top of the table.
  • In the search box, type "campaign" and select Session campaign.

The table will now reload to show a list of your campaign names, along with key metrics like Users, Sessions, Engaged sessions, and Conversions for each one. From here, you can click the blue "+" icon next to the primary dimension to add a secondary dimension like Session source / medium to get even more granular detail. This view will show you exactly which channels are performing best for each of your campaigns.

Final Thoughts

Setting up campaign tracking in Google Analytics might seem like a bit of technical work upfront, but the clarity it provides is transformative. By using a consistent system for your UTM parameters, you can finally move beyond guesswork and get a precise understanding of your marketing ROI, channel performance, and audience behavior.

Once your campaigns are up and running, analyzing the results across various platforms can still be a challenging and manual process. At Graphed, we simplify this by pulling all your data from Google Analytics, paid ad platforms like Facebook and Google Ads, your Shopify store, and your CRM into one place. You can then use plain English to ask questions and instantly build live dashboards, answering things like "which of my summer sale campaigns generated the most revenue?" in seconds, not hours. Feel free to give Graphed a try and see how easy real-time analytics can be.

Related Articles

How to Enable Data Analysis in Excel

Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!