UTM Link Builder Widget

Add a UTM link builder to your website. Marketers paste a page URL, fill in source, medium and campaign, and copy a correctly encoded tracking link - with warnings for capitals and spaces that would split their analytics reports.

Marketing Generator Runs in your browser Free · no ads

Customize your widget

Theme
Auto follows the visitor's light/dark setting.
Style
Attribution on your page
Optional and entirely your choice. The exact line is shown in the code below; it links to the tool with rel="nofollow".
More options
Starting values
Leave blank to use the widget's defaults. Visitors can still change every value.

Live preview

Exactly what your visitors will see

Embed code

<iframe src="https://a2z.tools/embed/w/utm-builder" title="UTM Link Builder by A2Z Tools" width="100%" height="590" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>

A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.

Works with

How it works

The link is built by the same tagging engine as the A2Z UTM Campaign Builder. It accepts only absolute http or https addresses, keeps any existing query parameters and the #fragment, replaces utm_ parameters already on the URL instead of duplicating them, and percent-encodes each value so characters like & and = cannot break the link. It then checks each value against the common lower-case, no-spaces convention, because Google Analytics treats Newsletter and newsletter as two different sources.

Method

  • Tagged URL = page URL + ? or & + utm_source=...&utm_medium=...&utm_campaign=...&utm_term=...&utm_content=... + #fragment
  • Each value is trimmed and encoded with encodeURIComponent
  • Existing utm_ parameters with the same name are replaced; other parameters are kept in order

Worked examples

A newsletter link

Inputs: URL https://example.com/pricing; source newsletter; medium email; campaign spring-sale

Result: https://example.com/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=spring-sale

No warnings: every value is lower case with hyphens.

Keeping a query and a fragment, with naming warnings

Inputs: URL https://shop.example.com/p/12?ref=home#reviews; source Facebook; medium paid-social; campaign summer sale

Result: https://shop.example.com/p/12?ref=home&utm_source=Facebook&utm_medium=paid-social&utm_campaign=summer%20sale#reviews

ref=home and #reviews survive; the widget warns that Facebook has capitals and that the space in the campaign became %20.

Limitations

  • Only the five classic parameters are built. utm_id, utm_source_platform, utm_creative_format and utm_marketing_tactic, which Google Analytics also reads, have to be added by hand.
  • It checks spelling conventions, not meaning: it cannot know that your team files newsletters under medium email, so an agreed naming list is still needed to keep GA4's default channel groups correct.
  • Tags can be lost after a redirect that drops the query string, or superseded by Google Ads auto-tagging (gclid) when both are present; test the final landing URL in your analytics real-time report.
  • The tagged link is long. Shortening it, or turning it into a QR code, has to be done with another tool.

Where publishers use it

  • Marketing team intranets and wikis, so every link follows the same naming
  • Newsletter and social-media guides teaching campaign tracking
  • Agency client portals where clients tag their own links
  • Analytics tutorials on GA4 acquisition reports

Questions

Which UTM parameters are required?

Google Analytics needs utm_source for campaign attribution, and uses utm_medium and utm_campaign for channel grouping and campaign reports, so fill all three. utm_term and utm_content are optional.

Why warn about capitals and spaces?

UTM values are case-sensitive in reports, so Email and email appear as separate rows. Spaces become %20 in the link and are easy to type inconsistently; hyphens are the usual separator.

Will it break my page's existing parameters?

No. Other query parameters and the #fragment are preserved; only utm_ parameters you fill in are added or replaced.

Are my links stored or shortened?

No. The link is built in the browser and nothing is sent to A2Z or saved.

Should I tag links between pages of my own site?

No. A UTM tag on an internal link starts a new session attributed to that campaign and overwrites where the visitor really came from. Use UTMs only on links placed off your site - emails, ads, social posts, partner sites.

What should go in utm_medium?

The type of channel, in terms GA4's default channel group rules match - for example email, cpc, social, affiliate or display, or a medium starting with paid for paid traffic. When no rule matches, GA4 reports the traffic as Unassigned.

Sources

  1. URL builders: Collect campaign data with custom URLs - Google Analytics Help . The utm_ parameter names, the advice to always set utm_source, utm_medium and utm_campaign, and that utm_source=google differs from utm_source=Google.
  2. Default channel group - Google Analytics Help . The source/medium rules GA4 uses to assign channels, and the Unassigned value when none match.

Cite or recommend this tool

If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.

A2Z Tools UTM Link Builder
https://a2z.tools/utm-campaign-builder

Preview