How to Track Links in Google Analytics

Cody Schneider7 min read

Ever posted a link on social media or sent out an email newsletter and wondered which specific effort drove traffic to your site? In Google Analytics, this traffic often gets lumped into broad categories like "Social" or "Direct," leaving you guessing about what’s actually working. This article will show you exactly how to track your links using UTM parameters so you can get clear, actionable insights into your marketing performance in Google Analytics 4.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

Why Bother Tracking Custom Links?

Tracking clicks is fundamental to understanding your marketing ROI. When you share a generic link, like yourwebsite.com/new-product, you lose valuable context. If you post that same link on Facebook, in a tweet, and in your email signature, GA4 will tell you that people arrived from those channels, but it can’t tell you which post or which banner they clicked on.

This is where custom tracking links come in. By adding special tags to your URLs, you’re giving Google Analytics precise information about where that click came from. It's the difference between knowing someone came from "the city" versus knowing they came from "123 Main Street."

Here’s what that lets you do:

  • Pinpoint Performance: Know exactly which ad, social post, email button, or influencer is sending you traffic and conversions.
  • Measure True ROI: If you spent $500 on an influencer campaign, you can see exactly how many visits and sales that specific link generated.
  • A/B Test Your Creative: Find out if people click on a link with an image of a product versus an image of a person. You can test which ad copy or call-to-action performs better.
  • Improve Data Accuracy: Clear up the notorious "Direct" traffic bucket, which often hides valuable referral information.

Ultimately, link tracking stops you from wasting time and money on channels that aren’t performing and lets you double down on the ones that are.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

The Anatomy of a Trackable Link: Understanding UTM Parameters

The magic behind tracking links is a set of tags called UTM parameters. UTM stands for "Urchin Tracking Module," a nod to the company Google acquired to create Google Analytics. These parameters are simply little snippets of text added to the end of a URL.

A standard URL looks like this:

https://www.yourstore.com/summer-collection

A trackable URL with UTM parameters looks like this:

https://www.yourstore.com/summer-collection?utm_source=facebook&utm_medium=social&utm_campaign=summer_sale_2024

That text after the question mark (?) doesn't change the page the user lands on. It’s invisible to them, but Google Analytics reads it loud and clear. There are five main UTM parameters you can use, but three are essential.

1. Campaign Source (utm_source) - Required

This tells you where the traffic came from. It's the platform, publication, or agent who is sending you the visitor.

  • Examples: google, facebook, newsletter_july, influencer_jane_doe

2. Campaign Medium (utm_medium) - Required

This explains how the traffic got to you. Think of it as the marketing channel or mechanism.

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

3. Campaign Name (utm_campaign) - Required

This identifies your specific marketing effort, promotion, or campaign you're running.

  • Examples: summer_sale_2024, q3_promo, new_product_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 GA4, this is often handled automatically (known as auto-tagging).

  • Examples: running_shoes, weekly_meal_planner
GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

5. Campaign Content (utm_content) - Optional

This is incredibly useful for A/B testing. If you have two different links pointing to the same place within the same email or ad (e.g., a header link and a footer link), you can use this tag to differentiate them.

  • Examples: blue_button, main_banner_ad, profile_link

How to Build Your Trackable Links: The Easy Way

Manually typing out UTM parameters is a recipe for typos and inconsistent data. A single misplaced character can skew your reports. Thankfully, there are free tools to make this foolproof.

Method 1: Google's Campaign URL Builder

Google provides a free, simple tool to generate these URLs for you. It’s perfect for one-off link creation.

  1. Navigate to the GA4 Campaign URL Builder page.
  2. Enter your base URL in the "Website URL" field (e.g., https://www.yourstore.com).
  3. Fill in your required UTM parameters: utm_source, utm_medium, and utm_campaign. For example:
  4. As you type, the tool will automatically generate the full campaign URL at the bottom of the page.
  5. Copy the generated URL and use it in your campaign!

Pro Tip: UTM links can get very long and look messy. Use a URL shortening service like Bitly to create a cleaner, shorter link before you post it, especially on character-limited platforms like Twitter or in link-in-bio tools.

Method 2: Using a Spreadsheet Template

For teams or anyone running multiple campaigns, a spreadsheet is the best way to stay organized and enforce consistency.

Create a simple Google Sheet or Excel file with columns for:

  • Date
  • Campaign Name
  • Base URL
  • Source
  • Medium
  • Content (optional)
  • Final Generated URL

In the "Final Generated URL" column, you can use a formula to automatically piece the URL together. This prevents typos and ensures your entire team uses the same naming conventions. Here’s a sample formula for Excel or Google Sheets:

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

This would take the base URL from cell C2, the source from D2, the medium from E2, and the campaign name from B2 to create your perfect trackable link.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

Best Practices for Consistent UTM Tagging

Great power comes with great responsibility. Sloppy UTM tagging creates messy reports. Follow these rules to keep your data pristine.

  • Stick to Lowercase: Google Analytics is case-sensitive. Facebook, facebook, and FB will show up as three separate sources in your reports. Establish a rule to use lowercase for everything to keep it clean.
  • Use Underscores or Hyphens, Not Spaces: Spaces in URLs get converted into messy characters like %20. Instead of summer sale, use summer_sale or summer-sale.
  • Be Descriptive but Concise: A campaign named summer_sale is much more useful than promo1. Conversely, july_2024_instagram_post_about_sandals is too long. Find a happy medium.
  • NEVER Use UTMs on Internal Links: This is the cardinal sin of link tracking. If you tag a link that goes from one page of your website to another, it will overwrite the original traffic source. If a user arrived from google / cpc, and they click your internally tagged link, GA4 will now believe they arrived from that tag (e.g., homepage_banner / internal), and you’ll lose the valuable attribution data.
  • Track Your Offline Campaigns: UTMs aren’t just for digital use! You can use them to create a URL for a QR code on a flyer. Set the source to flyer and the medium to print to measure how many people your physical marketing materials are driving to your site.

Finding Your Campaign Data in Google Analytics 4

Once you’ve built your links and traffic has started coming in, you need to know where to find the data. Here’s a walkthrough for GA4:

  1. Log in to your Google Analytics 4 property.
  2. On the left-hand menu, navigate to Reports > Acquisition > Traffic acquisition.
  3. By default, this report shows traffic grouped by Session default channel group. This provides a high-level view (like Organic Social, Paid Search, etc.).
  4. To see your UTMs in action, click the dropdown arrow at the top of the first column and change the primary dimension. Choose one of the following:
  5. To dig even deeper, click the + icon next to the primary dimension dropdown to add a secondary dimension. For instance, you can set "Session campaign" as your primary and then add "Session manual ad content" (utm_content) to see how differently worded links performed within the same campaign.

There you have it! You can now analyze which campaign drove the most users, sessions, and conversions, allowing you to make truly data-driven decisions about where to invest your time and budget for maximum impact.

Final Thoughts

Using UTM parameters is a straightforward yet powerful way to see exactly which marketing efforts are driving traffic and conversions, helping you make smarter, data-backed decisions. By moving beyond generic attribution, you can precisely measure your ROI and optimize your campaigns for better results.

Wading through Google Analytics reports is a great start, but getting the full picture across all your marketing platforms can still feel like a grind. As we are builders with experience managing campaigns and digging into reports, we too were tired of this, and that's why we built Graphed, a platform to automate this process by connecting all your data sources — from GA4 and Google Ads to Salesforce — in one place. You can create real-time dashboards simply by asking for what you need in plain language, turning chaos into streamlined reporting in seconds.

Related Articles