How to Track URLs in Google Analytics

Cody Schneider7 min read

You’re running ads on Facebook, sending out weekly newsletters, and posting on social media, but can you prove what’s actually working? If you look at Google Analytics, you might see traffic coming from "facebook.com" or your email marketing tool, but you don't know if it came from this week's email or last week's, or from your new video ad versus that old carousel ad. This article will show you exactly how to use URL tracking with UTM parameters in Google Analytics to finally connect your marketing efforts to real results.

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

Why Do I Need to Track URLs?

By default, Google Analytics gives you a high-level view of where your traffic comes from. You'll see sources like google, bing, facebook.com, or direct. While this is helpful, it’s not actionable. It doesn't tell you the story behind the click.

Imagine you sent out an email newsletter with two links to the same blog post. How do you know if people clicked the link in the intro text or the big button at the bottom? Or maybe you’re running three different Facebook ad campaigns. How do you know which specific campaign is driving the most valuable traffic?

This is where URL tracking comes in. By adding special pieces of information, called UTM parameters, to the end of your URLs, you give Google Analytics the exact context it needs. You’re essentially attaching a note to every click that says, "This person came from the summer sale email and clicked on the main hero banner."

The Benefits of Accurate URL Tracking:

  • Precise ROI Measurement: Finally attribute sales, sign-ups, and conversions directly to individual campaigns, ads, or even specific links.
  • Smarter Budget Allocation: See which channels and campaigns are performing best so you can confidently double down on what works and cut what doesn't.
  • Better A/B Testing: Test different ad creatives, email subject lines, or call-to-action buttons and see which version is more effective.
  • Clearer Reporting: Move beyond vague vanity metrics and provide stakeholders with clear, data-backed reports on marketing performance.
GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

Understanding UTM Parameters: The 5 Core Components

UTM stands for "Urchin Tracking Module." It’s a bit of a legacy name from a company Google acquired, but the concept is timeless. UTMs are simple text codes added to the end of a URL to track its performance. A tracked URL looks something like this:

https://www.yourwebsite.com/landing-page?utm_source=facebook&utm_medium=social&utm_campaign=summer_sale

The part after the question mark is the tracking code. It’s made up of key-value pairs (like utm_source=facebook), joined together by ampersands (&).

There are five standard UTM parameters you can use. The first three are required for meaningful tracking, while the last two are optional but very useful for more detailed analysis.

1. Campaign Source (utm_source) - REQUIRED

This answers the question: Where is the traffic coming from? It’s the platform, referrer, or source that is sending you the traffic.

  • Examples: facebook, google, instagram, quora, newsletter, klaviyo

2. Campaign Medium (utm_medium) - REQUIRED

This answers the question: How is the traffic coming to me? This is the marketing channel or medium used.

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

3. Campaign Name (utm_campaign) - REQUIRED

This answers the question: Why is the traffic coming to me? This is the name of your specific campaign, promotion, or marketing initiative.

  • Examples: summer_sale_2024, july_newsletter, black_friday_promo, new_feature_launch

4. Campaign Term (utm_term) - Optional

This is primarily used for paid search to identify the keywords you're bidding on. If you link your Google Ads account to Google Analytics, this is often handled automatically.

  • Examples: running_shoes, content_marketing_software
GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

5. Campaign Content (utm_content) - Optional

This is used to differentiate similar links within the same promotion. It's incredibly useful for A/B testing.

  • Examples: blue_button, header_link, video_ad_version_2, image_of_dog

How to Build Your Trackable URLs (Step-by-Step)

You don't need to manually type out these long URLs yourself. There are simple tools that handle it for you and prevent mistakes.

Method 1: Google's Campaign URL Builder

Google provides a free, easy-to-use tool for creating UTM-tagged URLs. This is the best place to start.

  1. Go to Google’s Campaign URL Builder.
  2. Enter the full destination URL for your website (e.g., https://www.yourwebsite.com/products/new-tshirt).
  3. Fill in the fields for campaign_source, campaign_medium, and campaign_name.

Example:

  • campaign_source: facebook
  • campaign_medium: social
  • campaign_name: summer_tshirt_launch
  1. (Optional) Add campaign_term and campaign_content if you need them. For example, if you're testing an ad with a picture versus a video, you could use image_ad and video_ad for campaign_content.
  2. The builder automatically generates the full campaign URL at the bottom of the page. Copy this URL and use it in your ad, email, or social media post. That's it!

Method 2: Use a Spreadsheet for Scalable Tracking

When you start creating dozens of URLs, it's easy to make typos or forget your naming conventions (facebook vs. Facebook vs. fb). Inconsistencies will fragment your data in Google Analytics, making your reports messy and unreliable. A simple spreadsheet can enforce consistency.

Create a Google Sheet or Excel file with the following columns:

  • Base URL
  • Source (utm_source)
  • Medium (utm_medium)
  • Campaign (utm_campaign)
  • Content (utm_content) (Optional)
  • Final URL

You can then use a formula in the Final URL column to automatically build your links. This keeps everything organized in one place and helps your whole team follow the same rules.

Here’s a sample formula for a cell in the Final URL column (assuming your data starts in row 2):

=A2&"?utm_source="&B2&"&utm_medium="&C2&"&utm_campaign="&D2

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 started using your tracked URLs, the data will begin flowing into Google Analytics. Here’s how to access it:

  1. In your GA4 property, navigate to the sidebar menu on the left and go to Reports.
  2. Under the "Life cycle" section, click on Acquisition, then select Traffic acquisition.
  3. The default report shows data grouped by "Session default channel group." This is GA's automatic grouping. To see your custom campaign data, click the dropdown menu for the primary dimension.
  4. From the dropdown, select Session campaign. This will now show a list of all your utm_campaign names.
  5. Now you can see how much traffic, how many conversions, and how much revenue each of your named campaigns drove.

To get even more detail, you can add a secondary dimension. Click the + icon next to the primary dimension dropdown and select "Session source / medium." This will show you exactly which source/medium combination performed best for each campaign.

Best Practices for Consistent and Clean URL Tracking

Following a few simple rules will save you massive headaches later.

  • Be Consistent with Naming: Decide on your naming conventions and stick to them. Is it facebook or Facebook? e-mail or email? Google Analytics is case-sensitive, so facebook and Facebook will show up as two separate line items. Create a guide or a spreadsheet for your team.
  • Always Use Lowercase: The easiest way to deal with case sensitivity is to just make everything lowercase. It's simple, clean, and avoids errors.
  • Use Underscores or Hyphens, Not Spaces: URLs can't handle spaces. Instead of summer sale, use summer_sale or summer-sale.
  • Never Use UTMs for Internal Links: Do not put UTM parameters on links within your own website (e.g., from your homepage to your blog). Doing so will overwrite the original traffic source. A visitor who came from Google organic search will suddenly look like they came from an internal campaign, completely breaking your attribution data.
  • Use a Link Shortener for Cleaner Sharing: A full URL with UTMs can be long and ugly. For social media posts or other places where the link is visible, use a service like Bitly or TinyURL to shorten it after you’ve built the full URL with your UTMs.

Final Thoughts

By implementing a consistent URL tracking strategy with UTM parameters, you move from guessing to knowing. You can finally see a clear line from your specific marketing activities to concrete business outcomes, allowing you to make smarter decisions backed by real data.

Building trackable links is an important first step, but the manual process of logging into Google Analytics, cross-referencing it with Shopify sales data, and checking Facebook for your ad spend is still a huge time sink. At Graphed, we automate that entire workflow. You can connect all your data sources - like Google Analytics, Shopify, and Facebook Ads - in a few clicks. Then, simply ask a question in plain English, like "Show me a report of my summer_sale_2024 campaign, breaking down traffic from Facebook and Klaviyo," and instantly get a live dashboard that answers your question without needing to build a manual report ever again.

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!