UTM Campaign Link Builder – Tagging URLs for Analytics
A UTM link is an ordinary web address with extra query-string values attached to it, such as https://shop.example.com/sale?utm_source=instagram&utm_medium=social&utm_campaign=spring-launch. The page itself loads exactly as it would without them. What changes is that the analytics tool running on that page can read the values and record where the visit came from, instead of filing it under an anonymous pile of direct or referral traffic.
The three ways hand-built tracking links fail
Campaign links are usually assembled by pasting text together, and that is where they break. The first failure is a second question mark: the destination already carried ?ref=hero, another ?utm_source=… is appended, and everything after the second ? is read as one long value. The second is the fragment. A URL is read in a fixed order — origin, path, query string, then #fragment — so parameters stuck onto the end of /page#details sit outside the query string and never reach the analytics tool. The third is double encoding, where a value that was already percent-encoded is encoded a second time and %20 turns into %2520.
This builder avoids all three by parsing your destination with the browser's own URL and URLSearchParams objects and re-serialising it, rather than joining strings by hand. Any parameters already on the URL survive, the separator between them is always correct, and the fragment stays at the end where it belongs.
What each parameter carries
utm_source names where the click came from, utm_medium describes the kind of channel, and utm_campaign is the label that groups many links into one campaign report. utm_term was introduced for the paid-search keyword behind an ad, utm_content exists to tell two variants of the same link apart, and utm_id carries your own campaign identifier. Three further parameters — utm_source_platform, utm_creative_format and utm_marketing_tactic — are read by GA4 and ignored by most other analytics tools, which is why they sit behind the Advanced section. Which parameters a given report needs differs by analytics vendor, so treat these fields as labels you are choosing rather than a fixed specification.
Why case and spaces change your reports
Analytics platforms compare these values character by character. Facebook, facebook and FaceBook therefore arrive as three separate rows that have to be added back together by hand. A raw space is transmitted as %20 or + and is often displayed that way too. The hygiene switches lowercase your values and collapse internal whitespace into a single - or _, and every change is shown beneath the field so the output never surprises you. The rules touch values only: the destination path is left exactly as typed, because path segments are case sensitive on most web servers.
Reading the URL anatomy strip
The finished link is broken into labelled chips — origin, path, the parameters that were already on your URL, each parameter this tool added, and the fragment last. The added chips are emphasised and the inherited ones are muted, so a glance tells you what changed. Seeing the fragment sitting after the parameters is the quickest way to internalise the ordering rule that hand-written links get wrong.
Tagging one campaign across many placements
The bulk tab takes lists of sources and mediums and builds every combination of them against one destination, so eight placements across three channels become one table rather than twenty-four rounds of copying and pasting. The result can be copied as newline-separated links or exported as CSV with the source, medium, campaign and URL in separate columns, ready to paste into an ad platform or a campaign sheet.