UTM Builder (Free Google Sheets Template) + Best Practices
Every marketing team I’ve worked with eventually runs into the same problem: someone launches a campaign with utm_source=Facebook and someone else uses utm_source=fb, and now your analytics show two separate traffic sources for the same platform. Multiply that across a dozen campaigns, three team members, and a few months, and your acquisition reports become useless.
That’s why I built this UTM builder template. It’s a Google Sheet with built-in formulas that assemble your tracking URLs automatically, plus validation rules that enforce a consistent naming convention across your team. You set it up once, share it with your team, and every campaign link follows the same structure from day one.
Why You Need a UTM Builder (Not Just a Generator)
There are plenty of free UTM generators online — Google even has an official one. The problem with those tools is that they’re one-off. You fill in the fields, copy the link, and there’s no record of what you built. Two weeks later, you can’t remember if the Black Friday campaign used black-friday or bf-2025 or promo-nov.
A spreadsheet-based builder solves this because it doubles as a log. Every URL you generate stays in the sheet, searchable and sortable. When your manager asks “what UTM did we use for that LinkedIn campaign in Q3?” you can find it in seconds instead of digging through old emails or ad platforms.
Download and Set Up the Template
Open the link below and go to File → Make a copy:
→ Copy the UTM Builder Template
The sheet has four sections:
- Input columns — where you type the base URL and your UTM parameters
- Generated URL — a formula column that assembles the full tracking link
- Validation rules — dropdown lists and data validation that enforce your naming convention
- Reference tab — a lookup table where you define your allowed sources, mediums, and campaign formats
Before you start building links, spend five minutes on the Reference tab. This is where you define the rules your team will follow.
Setting Your Naming Convention
This is the most important part of the setup, and it’s where most teams cut corners. A good naming convention has three properties: it’s lowercase, it uses hyphens instead of spaces, and it follows a predictable pattern.
Here’s the taxonomy I recommend as a starting point:
Source identifies where the traffic is coming from. Keep these short and consistent. Use google, not Google or google.com. Use facebook, not fb or Facebook Ads. Common values: google, facebook, linkedin, newsletter, partner-site.
Medium describes the marketing channel type. This should align with how Google Analytics categorizes channels. Use cpc for paid search, email for email campaigns, social for organic social, referral for partner links. Don’t invent new mediums unless you have a clear reason — GA4’s default channel grouping relies on recognizing standard medium values.
Campaign is where you have the most flexibility, but structure still matters. I like the format yyyy-mm_channel_goal because it sorts chronologically and tells you at a glance what the campaign was about. For example: 2025-10_linkedin_webinar-signup or 2025-11_email_black-friday.
Content (optional) differentiates variations within the same campaign — different ad creatives, CTA buttons, or placements. Examples: ad1-image, ad2-video-15s, cta-header, cta-footer.
Term (optional) is mainly used for paid search keywords. If you’re running Google Ads with auto-tagging enabled, you usually don’t need this.
How the Link-Building Formula Works
The template uses a single formula in the Generated URL column. Here’s what it does, broken down so you can modify it if needed:
=LOWER(
A2 & "?utm_source=" & ENCODEURL(B2)
& "&utm_medium=" & ENCODEURL(C2)
& "&utm_campaign=" & ENCODEURL(D2)
& IF(E2<>"", "&utm_content=" & ENCODEURL(E2), "")
& IF(F2<>"", "&utm_term=" & ENCODEURL(F2), "")
)
A few things to note about this formula:
LOWER() wraps everything to force lowercase. This prevents the Facebook vs facebook problem. Even if someone types in mixed case, the output URL will always be lowercase.
ENCODEURL() handles special characters. If your campaign name contains a space or an ampersand, this function converts it to URL-safe encoding (spaces become %20). Without this, your tracking link could break.
The IF wrappers on content and term mean those parameters are only appended when you actually fill them in. If you leave content blank, the URL won’t have an empty &utm_content= dangling at the end.
Setting Up Validation Rules
To prevent team members from typing freeform values, set up data validation on the source and medium columns:
- Go to the Reference tab and list your approved values in columns (one column for sources, one for mediums).
- Back on the main sheet, select the Source column, go to Data → Data validation.
- Choose List from a range and point it to your Reference tab’s source list.
- Check Show warning or Reject input depending on how strict you want to be.
Repeat for the Medium column. For Campaign, I usually don’t restrict to a dropdown (too many unique values), but I do add a validation rule that rejects values containing spaces or uppercase letters:
Custom formula: =AND(EXACT(D2, LOWER(D2)), NOT(REGEXMATCH(D2, " ")))
This catches the most common mistakes without being overly restrictive.
QA Checklist Before Sharing Links
Before you drop a UTM link into an ad platform or email, run through these checks:
Test the URL in a browser. Click it. Does it load the right page? A surprising number of UTM links break because the base URL already contains a ? parameter, and the formula adds a second one. If your base URL has query strings, change the first ? in the formula to &.
Check for double encoding. If you’re pasting the URL into a platform that also encodes URLs (like some email tools), you can end up with %2520 instead of %20. Test by clicking the link from the actual platform, not just from the spreadsheet.
Verify in GA4 real-time. After clicking your test link, open GA4 → Reports → Real-time. You should see your source, medium, and campaign appear within a few seconds. If it doesn’t show up, the UTM parameters aren’t being read — usually a formatting issue.
Where UTM Data Appears in Analytics
GA4: Go to Reports → Acquisition → Traffic acquisition. Add secondary dimensions for Session source, Session medium, and Session campaign. You can also build custom explorations filtered by campaign name to see conversion funnels for specific campaigns.
Ad platforms: Most ad platforms (Google Ads, Meta, LinkedIn) let you set a final URL that includes UTM parameters. The platform’s own tracking runs in parallel, so you get both platform-reported and GA-reported numbers. The two rarely match exactly — that’s normal and expected.
CRMs: If your form capture tool passes the URL’s query string into a hidden field, you can see which campaign generated each lead. Tools like HubSpot and Salesforce can parse UTM parameters automatically.
FAQ
Do UTMs affect SEO? No. UTM parameters don’t influence search rankings. Google ignores query strings for ranking purposes. However, you should set canonical URLs on your pages to prevent UTM-tagged versions from being indexed as separate pages.
How long should campaign names be? Keep them readable but concise. I aim for under 60 characters total for the campaign value. Longer names work technically but become hard to scan in reports.
Should I use UTMs for internal links? Generally no. UTM parameters are designed for external traffic sources. Using them on internal links (like navigation menus or in-site banners) will overwrite the original source attribution in GA4, making your acquisition data inaccurate. For internal campaign tracking, use events or custom dimensions instead.
What about short links? You can run your UTM links through a shortener like Bitly or your own domain shortener. The UTM parameters survive the redirect and still get captured by analytics. This also makes links more shareable on social media.