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.
Live preview
Exactly what your visitors will seeUnder the widget on your page: Powered by A2Z Tools
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.
<div data-a2z-widget="utm-builder" data-height="590"></div> <script async src="https://a2z.tools/embed.js"></script>
Adds a small script (what it does) that sizes the widget to fit its content, loads it lazily and keeps it isolated from your page's CSS.
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
- 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.
- 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
<a href="https://a2z.tools/utm-campaign-builder">A2Z Tools UTM Link Builder</a>
[A2Z Tools UTM Link Builder](https://a2z.tools/utm-campaign-builder)
UTM Link Builder by A2Z Tools - https://a2z.tools/utm-campaign-builder
Related widgets
-
Conversion rate from visitors and conversions, with an optional A/B comparison and z-test.
-
Return on ad spend as a multiple and a percentage, with break-even ROAS from your margin.
-
Social media engagement rate by followers and by reach, for one post or several.
-
Solve CPM, campaign cost or impressions from the other two.
-
Cost per click plus CTR, CPM, conversion rate and CPA from one campaign's totals.