How to build UTM links for GA4 that report the right source

How to build UTM links for GA4 that report the right source

UTM tags tell Google Analytics where a visit came from, but only when every link is spelled the same way. Pick the values, build the links, and check each one before it goes out.

How careless UTM tags split your reports

GA4 treats UTM values as case-sensitive. Tag one email Newsletter and the next newsletter, and the report shows two sources. Add FB and facebook to the mix and one channel turns into several rows. Spaces cause their own trouble: Spring Sale has to be encoded, and an & or # typed by hand inside a value can break the link.

The medium matters more than it looks. GA4 sorts traffic into default channel groups by these values, so cpc lands in Paid Search, email in Email, and paid_social in Paid Social. A medium GA4 doesn't recognise won't land in those groups. UTM tags on links between your own pages are worse still: each click starts a new session, and the source that brought the visitor in is lost.

Build the links, then check them

The UTM Builder takes the website URL and the source, medium, and campaign, plus term, content, and ID when you need them. Presets fill in standard pairs, such as google and cpc for Google Ads, or newsletter and email for a mailing. It warns about capital letters and spaces, keeps existing query parameters and the #fragment in the right place, and encodes every value with the browser's own URL objects. Switch to Many URLs to tag a whole list at once and download the result. It won't stop you from tagging internal links, so that part is up to you.

Before a link goes into an ad or an email, paste it into the URL Parser. It splits the URL into scheme, host, path, query parameters, and fragment, shows encoded values decoded, and puts each parameter on its own row. A doubled utm_source or a fragment in the wrong place is easy to spot there. You can edit the table and copy the rebuilt URL.

When a value has to be encoded by hand, for example in an email template, use the URL Encoder / Decoder in Component mode. It encodes everything except letters, digits, and - _ . ~, so a space becomes %20 and & becomes %26. Full URL mode keeps & and =, which suits a whole address and breaks a single value.

Build a set of UTM links for one campaign

  1. Write the campaign name in lowercase with underscores or hyphens, such as spring_sale.
  2. Pick one source and medium per channel and keep them in a shared list, for example newsletter with email, and facebook with paid_social.
  3. Open the UTM Builder, enter the landing page, and choose a preset or type the source and medium.
  4. Add the campaign name. For two links in the same email or ad, give each a different utm_content value.
  5. For many landing pages, switch to Many URLs, paste one link per line, and download the tagged list.
  6. Paste each final link into the URL Parser and check that every utm parameter appears once, with the value you meant.
  7. Use the tagged links on other sites, ads, and emails only, never on links between your own pages.

What the tools can't fix in your tracking

  • GA4 treats values as case-sensitive, and no tool can match a spelling to the one used in your earlier campaigns.
  • Tags on links between pages of your own site start a new session on each click, and the original source is lost.
  • Google Ads auto-tagging already tracks Google Ads clicks, and GA4 prefers it when both are present.
  • Full URL mode in the encoder can't tell which & or = belongs to a value. Encode values one at a time in Component mode.

Frequently asked questions

Which UTM parameters does GA4 need?

utm_source, utm_medium, and utm_campaign. GA4 can attribute a visit without the others, but not without these three.

Should UTM values be lowercase?

Yes. GA4 is case-sensitive, so Facebook and facebook become two rows. Use lowercase, with underscores or hyphens instead of spaces.

Which utm_medium should I use for paid social ads?

paid_social. GA4 sorts it into Paid Social, while cpc goes to Paid Search and email to Email.

Do UTM links hurt SEO?

Not when the page has a canonical tag pointing to the clean URL. Keep UTM tags out of internal links and sitemaps.

Tools used in this guide

  • UTM BuilderInternet Tools

    Adds utm_source, utm_medium, and utm_campaign tags to links.

  • URL ParserDeveloper Tools

    Breaks a URL into its parts and lets you edit query parameters.

More from the blog

All guides