How to Add Campaign to Google Analytics
If you're spending time, money, and effort on marketing campaigns, you need a clear way to see what's actually driving results. Blindly running ads or sending emails is like guessing in the dark. This guide will walk you through exactly how to set up campaign tracking in Google Analytics 4 so you can connect your marketing activities directly to website traffic and conversions.
What Are UTM Parameters (and Why Do They Matter)?
Tracking campaigns in Google Analytics relies on something called UTM parameters. It sounds technical, but the concept is simple: UTMs are just small tags you add to the end of a URL. These tags tell Google Analytics specific details about where a click came from.
Think of them as sending a memo to Google Analytics with every click. Without them, traffic from a specific Facebook ad, an email newsletter, or a social media post might just show up as "Direct" or "social," leaving you with no real insight.
Here’s what a typical link looks like without UTM tracking:
https://www.yourcoolshop.com/summer-sale
And here’s that same link with UTM parameters added:
https://www.yourcoolshop.com/summer-sale?utm_source=facebook&utm_medium=cpc&utm_campaign=summer_sale_2024
That extra information at the end doesn't change what the user sees on the page, but it gives Google Analytics a complete backstory for that visit. There are five standard UTM parameters, three of which are required:
- utm_source (Required): This identifies the platform or website that sent the traffic. It answers the question, "Where did the user come from?" Examples:
google,facebook,newsletter,klaviyo. - utm_medium (Required): This identifies the marketing channel or medium. It answers, "How did the user get here?" Examples:
cpc(cost-per-click),email,social,organic,affiliate. - utm_campaign (Required): This names the specific campaign you are running. It answers, "Why are we driving traffic?" Examples:
summer_sale_2024,q4_promo,new_product_launch. - utm_content (Optional): This is used to differentiate between similar content in the same campaign. For example, if you have two links in the same email newsletter (one button and one text link), you could use
button_linkvs.text_linkhere. - utm_term (Optional): This is typically used to track specific keywords for paid search campaigns. If you're manually tagging Google Ads links (though auto-tagging is usually better), you might put keywords like
running_shoeshere.
By using these parameters, you turn messy, general data into crystal-clear reports that show exactly which campaigns are winners and which ones are draining your budget.
How to Create Campaign Tracking URLs
Creating these tagged URLs is straightforward, and there are two main ways to do it. You can use Google’s free tool, which is perfect for beginners, or put them together manually once you’re comfortable with the structure.
Method 1: Use Google's Campaign URL Builder
Google offers a free, easy-to-use tool called the GA4 Campaign URL Builder that does the hard work for you. It prevents typos and makes sure your URL is formatted correctly.
Here’s how to use it step-by-step:
- Head to the Builder: You can find it with a quick search for "GA4 Campaign URL Builder" or by navigating to it directly. It’s a simple web form.
- Enter Your Destination URL: In the "Website URL" field, paste the full URL of the page you want to send people to. For example,
https://www.yourcoolshop.com/summer-sale. - Fill In Your Campaign Parameters:
- Add Optional Parameters (if needed): You can also fill in Campaign Term (for keywords) and Campaign Content (for A/B testing ad creative or link placements). For example, you might set
utm_contenttoblue_ad_creative. - Copy Your New URL: As you fill in the fields, the tool automatically generates the campaign URL at the bottom of the page. Simply copy this generated URL.
You can now use this full, tagged URL in your advertisement, social media post, or email. Every time a user clicks it, Google Analytics will record the visit with all the source, medium, and campaign information you defined.
Method 2: Build UTM URLs Manually
Once you get the hang of it, you might find it quicker to build these URLs yourself, especially if you're creating several for one campaign. The structure is always the same.
A campaign URL has three parts:
- The base landing page URL.
- A question mark (
?) after the URL. This signals the start of the parameters. - Your UTM parameters, each separated by an ampersand (
&).
So, the formula is: BaseURL?utm_source=my_source&utm_medium=my_medium&utm_campaign=my_campaign
Let's revisit our "Summer Sale" link you’d use for a paid ad on LinkedIn:
- Base URL:
https://www.yourcoolshop.com/summer-sale - Parameter 1:
utm_source=linkedin - Parameter 2:
utm_medium=cpc - Parameter 3:
utm_campaign=summer_sale_2024
Putting it all together, you simply start with the base URL, add a ?, then add your parameters separated by &.
https://www.yourcoolshop.com/summer-sale?utm_source=linkedin&utm_medium=cpc&utm_campaign=summer_sale_2024
Easy enough, right? The key to doing this manually is consistency. A typo can send data to the wrong bucket in your reports.
Best Practices for Consistent Campaign Tracking
Setting up URLs is the first step, but maintaining clean, reliable data over time requires a disciplined approach. Inaccurate data is often worse than no data at all. Follow these simple rules to keep your campaign reporting sharp.
1. Create a Clear Naming Convention
Consistency is everything. Google Analytics treats Facebook, facebook, and FB as three completely different sources. This splits your data and makes analysis a nightmare. Sit down with your team and agree on a consistent way to name your sources, mediums, and campaigns.
- Always use lowercase: This is the easiest way to avoid case-sensitivity issues.
- Use underscores or hyphens, not spaces: Spaces in URLs can cause unexpected encoding issues. Instead of
summer sale, usesummer-saleorsummer_sale. - Be descriptive but concise: A campaign named
q3_clearance_sale_2024is much more useful than justsale.
2. Keep a Master Spreadsheet
One of the best habits to form is keeping a shared spreadsheet (like a Google Sheet) of all the campaign URLs your team creates. This acts as your source of truth and prevents different team members from inventing their own naming schemes.
Your sheet can have columns for:
- Date created
- Campaign Name
- Source
- Medium
- The final generated URL
- Who created it
This simple document ensures everyone is aligned and helps you avoid polluting your analytics data with messy UTMs.
3. Don't Use UTMs for Internal Links
A common mistake is using campaign tracking for links on your own website. For example, putting UTM tags on a banner ad on your homepage that links to another page on your site. Don't do this! It will overwrite the user's original traffic source information. If a user arrived from an organic Google search, clicking an internal UTM-tagged link would start a new session, attributing the visit to your UTM instead of organic search. This will permanently skew your acquisition data.
Where to Find Your Campaign Data in Google Analytics 4
So you’ve created your URLs and launched your campaigns. Now comes the best part: seeing the data roll in. Here's how to find your campaign performance in GA4.
- Login to Google Analytics 4: Navigate to your GA4 property.
- Go to the Reports Section: On the left-hand navigation panel, click the 'Reports' icon (it looks like a small bar chart).
- Navigate to Acquisition Reports: Under the 'Life cycle' dropdown, click 'Acquisition'.
- Open the Traffic Acquisition Report: This is the main report for seeing how users are finding your site. Click "Traffic acquisition."
Once you’re in the report, you might see data grouped into broad channels like "Paid Social" or "Email." To see the custom campaigns you created, you need to change the primary dimension.
- Above the data table, you'll see a dropdown menu that likely defaults to "Session default channel group."
- Click that dropdown menu and change it to "Session campaign".
Voilá! The report will now update to show a list of your campaigns, as defined by your utm_campaign tags. You'll see key metrics like users, sessions, engaged sessions, and conversions broken down for each campaign name, letting you compare performance at a glance.
Digging Deeper
To get even more granular, you can add a secondary dimension. Click the small blue "+" sign next to the primary dimension dropdown and select another parameter, such as:
- Session source / medium: To see exactly which source/medium combination is performing best within a single campaign.
- Session manual ad content: This corresponds to
utm_content, letting you see which ad creative or link drove the most traffic and conversions.
Exploring this report is central to understanding what works. You can finally answer questions like, "Did our LinkedIn campaign drive more sign-ups than our email newsletter?" or "Which Facebook ad creative from our summer sale actually drove sales?"
Final Thoughts
Properly tagging your URLs with UTM parameters is a non-negotiable step for any serious marketer. It’s what transforms Google Analytics from a general traffic overview into a powerful tool that connects specific marketing efforts to tangible business outcomes like conversions and revenue.
Manually building links and piecing together reports from Google Analytics, Facebook Ads, Shopify, and your CRM can feel like a full-time job. At Graphed, we automate all of that manual repetition. Because we connect directly to all your data sources, we give you a unified, real-time view of campaign performance. Instead of wrangling spreadsheets, you can simply ask things like, "Show me my Facebook ad spend versus Shopify revenue by campaign for last month," and get a live dashboard in seconds, letting you focus on strategy instead of report-building.
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!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.