Skip to main content
ToolstikToolstik
BlogSEO

How to Build UTM Links for Google Analytics 4

Toolstik5 min read
Campaign URL with utm_source, utm_medium, and utm_campaign parameters highlighted

To build a UTM link, open the free UTM Link Builder, paste your landing page URL, and fill in Campaign source, Campaign medium, and Campaign name. The tool adds utm_source, utm_medium, and utm_campaign to your URL and, by default, lowercases the values and swaps spaces for hyphens so Google Analytics 4 reports stay consistent. Copy the Campaign URL and use it in your email, ad, or social post.

Try it now

UTM Link Builder

Open full tool

Loading tool…

What UTM parameters do

UTM parameters are tags added to the end of a URL that tell your analytics tool where a visit came from. Google's guide to collecting campaign data with custom URLs covers how GA4 reads them. The builder supports six:

Field in the toolParameterUse it for
Campaign source *utm_sourceWhere the traffic comes from: newsletter, google, facebook
Campaign medium *utm_mediumThe marketing channel: email, cpc, social
Campaign name *utm_campaignThe promotion or launch: spring-sale
Campaign IDutm_idOptional ID for imported cost data
Campaign termutm_termOptional paid keyword
Campaign contentutm_contentOptional, to tell apart links in the same ad or email

Fields marked with * are required.

How to build a UTM link, step by step

  1. Open the UTM Link Builder. It starts with sample values (https://toolstik.com/, newsletter, email, october-launch) that you can overwrite.
  2. Paste your landing page into Website URL. If you leave off https://, the tool adds it.
  3. Fill in Campaign source, Campaign medium, and Campaign name.
  4. Optionally add Campaign ID, Campaign term, or Campaign content.
  5. Leave the toggle Lowercase values and replace spaces with hyphens on unless you have a reason not to.
  6. Copy the Campaign URL.

If something is missing or invalid, a "Fix to generate a link" message tells you what to change, for example "Campaign medium is required."

Worked examples

A newsletter link. Website URL https://toolstik.com/tools/merge-pdf, source Newsletter, medium email, campaign Spring Sale 2026:

https://toolstik.com/tools/merge-pdf?utm_source=newsletter&utm_medium=email&utm_campaign=spring-sale-2026

"Newsletter" became newsletter, and "Spring Sale 2026" became spring-sale-2026.

With the toggle off, the same inputs keep their capitals, and spaces are encoded as +:

https://toolstik.com/tools/merge-pdf?utm_source=Newsletter&utm_medium=email&utm_campaign=Spring+Sale+2026

A URL that already has a query string and an anchor. Website URL example.com/shop?ref=footer#pricing, source linkedin, medium social, campaign Spring Sale 2026, content Carousel Post:

https://example.com/shop?ref=footer&utm_source=linkedin&utm_medium=social&utm_campaign=spring-sale-2026&utm_content=carousel-post#pricing

The existing ref=footer parameter is kept, the UTM tags go after it, and the #pricing anchor stays at the end where it belongs. If the URL already has UTM tags, the builder replaces them instead of adding duplicates.

Best practices

  • Write down a naming convention and stick to it: for example, always email (never e-mail or Email) and always facebook (never fb). A shared spreadsheet of approved values helps teams.
  • Keep the lowercase toggle on. GA4 values are case-sensitive, so Email and email show up as two rows.
  • Use common medium names like email, cpc, social, and referral. GA4 uses source and medium to group traffic into channels, so made-up mediums can end up in "Unassigned".
  • Use utm_content to compare variations, such as header-link vs footer-link in the same email.
  • Test the link by opening it and checking GA4's Realtime report before you send the campaign.

Common mistakes

  • Tagging internal links. A UTM link from your homepage to your pricing page overwrites the visitor's real source, such as organic search, with your made-up campaign. Use UTMs only on links from outside your site.
  • Mixing cases and spellings across a campaign, which splits the data.
  • Putting personal data in UTM values, such as email addresses. URLs get logged and shared, and Google Analytics policies don't allow sending personally identifiable information.
  • Forgetting that UTMs show in the address bar. Visitors can see them, so keep names professional.

Troubleshooting

"Use an http:// or https:// URL." UTM links only work on web pages. Remove other schemes like ftp:// or mailto:.

"That doesn't look like a valid URL." Check for spaces or typos in the domain.

The campaign doesn't show up in GA4. Make sure the landing page has your GA4 tag and doesn't redirect in a way that drops the query string. Reports can take a while to update, so check Realtime first.

The link looks long and messy. That's normal. If you need a short link for print or SMS, put the full UTM URL into a link shortener. To read a tagged URL, paste it into the URL Encoder/Decoder to decode values like %20 or +.

Alternatives

Google's own GA4 Campaign URL Builder does the same job and also covers app campaign links. Many email and ad platforms can add UTM tags automatically. Toolstik's builder is useful when you want lowercase normalization on by default, with existing query strings and anchors handled for you.

If you also need a clean landing page URL, see how to create an SEO-friendly URL slug, or use the Case & Slug Converter to turn a campaign name into a consistent hyphenated value. Before the campaign goes out, make sure the landing page's search snippet is ready with our guide on how to write a meta title and description.

Privacy

Links are built in your browser. Toolstik doesn't log your URLs or campaign names. For the full set of writing and marketing tools, see free SEO and text tools.

Frequently asked questions