How to Track a Campaign in Google Analytics
Stop guessing which of your marketing efforts are actually working. With custom campaign tracking in Google Analytics, you can see exactly how much traffic and revenue your email newsletters, social media posts, and QR codes are generating. This article will guide you step-by-step through setting up campaign tracking using UTM parameters so you can finally measure the real ROI of your work.
Why Manually Tracking Campaigns is Still a Big Deal
You might think Google Analytics just handles tracking traffic sources automatically. And to some extent, it does. When you link Google Ads, traffic from your paid search is neatly labeled. Organic Google searches show up as "Organic Search." But what about everything else? What about the link in your weekly email newsletter, your brilliant organic post on LinkedIn, or the QR code on your latest print mailer?
Without special tracking, a lot of this valuable traffic gets miscategorized. Traffic from email clients like Outlook or links clicked in apps often gets thrown into the "(direct)" bucket, making it look as though those visitors magically typed your URL directly into their browser. Traffic from social media sometimes just shows up as the referral site, like "t.co" from X (formerly Twitter), robbing you of the context of which specific post or campaign drove the visit.
This is where manual campaign tracking saves the day. By adding simple tags to your links, you tell Google Analytics exactly where a user came from and why. Proper tracking allows you to:
Calculate true ROI: Know precisely how much revenue your influencer marketing campaign generated versus the cost.
Optimize your channels: Discover that your Instagram bio link drives more sales-qualified leads than your LinkedIn profile link.
Compare A/B tests: See which call-to-action in your email - a simple text link or a splashy button - gets more clicks and leads to more purchases.
Justify your budget: Show clear performance data about the campaigns you’re running to make data-backed decisions on where to invest more time and money.
Without it, you’re flying blind, relying on gut feelings instead of clear, actionable data.
Understanding the Secret Sauce: UTM Parameters
The magic behind it all is a set of tags called UTM parameters. "UTM" stands for Urchin Tracking Module, a callback to Urchin, the software company Google acquired to create Google Analytics. These are simply snippets of text you add to the end of a URL to feed information directly into your analytics reports.
A normal URL looks like this: https://www.yourshop.com/products/hiking-boots
A URL tagged for a specific campaign looks like this: https://www.yourshop.com/products/hiking-boots?utm_source=instagram&utm_medium=social&utm_campaign=winter_promo&utm_content=story_link
That extra bit on the end holds all the context. It looks a bit technical, but it’s actually made up of five easy-to-understand parameters.
The Five UTM Parameters Explained
Think of them as answering the who, what, where, when, and why of your visitor's journey. Three are required, and two are optional but highly valuable for digging deeper.
utm_source (Required): This identifies where the traffic is coming from. It's the referrer, like google, facebook, newsletter, or an influencer's handle like sarah_gets_fit. Example:
&utm_source=spring_newsletterutm_medium (Required): This identifies the marketing medium or how the traffic got to you. Think in broad categories like email, social, cpc (cost-per-click), or affiliate. Example:
&utm_medium=emailutm_campaign (Required): This is the why. It identifies the specific promotion, slogan, or strategic campaign. This is how you group all related efforts together. Example:
&utm_campaign=25_off_flash_saleutm_content (Optional): This is used to differentiate similar links within the same campaign. It's perfect for A/B testing. For instance, in an email, you might track clicks on a header link versus a footer link, or a text link versus a button image. Example:
&utm_content=header_bannervs.&utm_content=footer_linkutm_term (Optional): This was originally used to track specific keywords for paid Adwords campaigns. With Google Ads' auto-tagging, it's less commonly used today, but it can be repurposed to identify things like ad set targeting or other specific details in paid campaigns on other platforms. Example:
&utm_term=mens_hiking_boots_wide
Step-by-Step: How to Create Your Campaign URLs
Manually typing out all those parameters is a recipe for typos and broken links. Fortunately, Google provides a free and easy-to-use tool to build these URLs for you.
Using Google's Campaign URL Builder
The Dev Tools Campaign URL Builder makes the process foolproof. Let's create a URL for an Instagram story promoting a winter sale.
Open the URL builder: You can find it with a quick search for "GA4 Campaign URL Builder."
Enter your webpage URL: This is the base link you want to send people to. Example:
https://www.yourshop.com/sale/winter-collectionFill in the campaign parameters: This is where you bring your tracking plan to life. For our Instagram story example:
utm_source:
instagramutm_medium:
socialutm_campaign:
winter_sale_2024utm_content:
story_sticker_link(This helps you distinguish traffic from this story compared to, say, the link in your Instagram bio).
Copy your generated URL: The tool will automatically create the final campaign URL at the bottom of the page. It will look something like this:
https://www.yourshop.com/sale/winter-collection?utm_source=instagram&utm_medium=social&utm_campaign=winter_sale_2024&utm_content=story_sticker_link
Now, you can use that long URL in your Instagram Story link sticker, in your email service provider, or wherever you're promoting that content. When someone clicks it, the parameters will be passed cleanly to Google Analytics.
Best Practices for Consistent UTM Tagging
Untamed UTMs can create a messy, unusable report. Your data is only as good as its consistency. Follow these rules to keep your tracking clean:
Be consistent: Google Analytics is case-sensitive.
Facebook,facebook, andFBwill show up as three separate sources. Settle on a single format - lowercase is the standard - and stick with it.Use a cheatsheet: Create a simple Google Sheet or shared document where your team can see and use the agreed-upon naming conventions. This prevents one person from using influencer while another uses affiliate.
Keep it simple and readable: Use terms that anyone on your team can understand.
jan_2024_newsletteris much better at a glance thannl_01_24_ver2.Use underscores or hyphens, not spaces: Spaces in URLs get replaced with messy characters like
%20. Instead, usewinter_saleorwinter-sale.NEVER use UTMs on your own website's internal links: This is the golden rule. Adding a UTM-tagged link from one page of your site to another will overwrite the original traffic source and start a new session. Your data will be completely inaccurate, attributing conversions to your own site instead of the actual source that brought the user there in the first place. Campaign tags are only for external links pointing to your site.
Finding Campaign Data in Your GA4 Reports
So you've created and distributed your tagged URLs, and the traffic is rolling in. Where do you find the data? In Google Analytics 4, the primary report for this is the Traffic acquisition report.
Login to your Google Analytics 4 property.
In the left-hand navigation, go to Reports → Acquisition → Traffic acquisition.
By default, this report groups traffic by the
Session default channel group. To see your campaign data, click on the dropdown arrow above the first column.To see your
utm_campaignvalues, selectSession campaign. To see your source and medium combined, selectSession source / medium. You can also analyze just your source (Session source), medium (Session medium), or content (Session manual ad content).
Once you’ve set Session campaign as your primary dimension, you’ll see rows for each of your utm_campaign names, like winter_sale_2024. Your report metrics will show you Users, Sessions, Engagement rate, and Conversions, all tied to that specific campaign!
Going a Level Deeper with Secondary Dimensions
To get even more granular, click the small plus (+) button next to your primary dimension column header and add a secondary dimension. For example:
Set your primary dimension to
Session campaignAdd a secondary dimension of
Session Source / Medium
Now, you can see exactly which sources and mediums drove the most traffic within each of your campaigns. This allows you to see that your winter_sale_2024 campaign performed differently across instagram/social, facebook/social_paid, and newsletter/email.
Final Thoughts
Tracking your marketing campaigns isn't just a fancy analytics trick - it’s fundamental to making smart business decisions. By using UTM parameters and Google’s Campaign URL Builder, you can turn direct traffic into clear, actionable insights inside Google Analytics. You can finally prove the value of email lists, social media efforts, and any other promotions you run.
While Google Analytics is powerful for finding this data, it can be a little cumbersome. Jumping into the Traffic Acquisition report and adding session dimensions might seem complex, but it’s worth the effort. For more simplified efficiency, our platform, Graphed, helps streamline the process. Instead of manually manipulating reports across all your platforms, like Google Analytics, Facebook Ads, and Shopify, you can just focus on increasing campaign success and revenue.