Boneyard Tools

UTM Link Builder

Attach utm_source, utm_medium, and utm_campaign (plus optional term and content) to any destination URL so your analytics can credit the right channel. The link rebuilds as you type, every value is URL-encoded, and an existing query string or #fragment on your URL is left intact. Hit 'Copy link' and paste it into your email, ad, or social post.

How to build a UTM link

  1. Paste your page address into the Destination URL field.
  2. Fill in the required Source, Medium, and Campaign fields.
  3. Add optional Term and Content values if you are tagging keywords or creatives.
  4. Watch the Campaign URL preview update with each keystroke.
  5. Click 'Copy link' and drop the tagged URL into your campaign.

Examples

Tag a newsletter link

Destination https://example.com/landing, Source newsletter, Medium email, Campaign spring sale
https://example.com/landing?utm_source=newsletter&utm_medium=email&utm_campaign=spring%20sale

Keep an existing query parameter

Destination https://shop.example.com/sale?ref=home, Source google, Medium cpc, Campaign summer
https://shop.example.com/sale?ref=home&utm_source=google&utm_medium=cpc&utm_campaign=summer

Preserve a page fragment

Destination https://blog.example.com/post#comments, Source twitter, Medium social, Campaign launch
https://blog.example.com/post?utm_source=twitter&utm_medium=social&utm_campaign=launch#comments

Frequently asked questions

Which UTM parameters are required?

utm_source, utm_medium, and utm_campaign are required, and each is marked with a red asterisk. utm_term and utm_content are optional and are dropped from the link when you leave them blank.

What should go in source, medium, and campaign?

Source is where the click comes from (newsletter, google, twitter), medium is the channel type (email, cpc, social), and campaign is the initiative name (spring_sale, launch). Keeping these consistent is what makes analytics reports readable.

Does it handle a URL that already has query parameters?

Yes. If your destination already contains a question mark and a real parameter, the UTM values are appended with an ampersand so the existing query stays intact. A bare trailing question mark is handled too.

Are values encoded correctly?

Yes. Spaces and special characters are URL-encoded, so a campaign like spring sale becomes spring%20sale. That keeps the link valid and prevents analytics tools from splitting a value in the wrong place.

What happens to a URL fragment?

A trailing fragment like #comments is detached, the UTM parameters are inserted before it, and the fragment is reattached at the very end. This matters because anything after the # is not sent to the server and would otherwise swallow your parameters.

Are the term and content fields worth using?

utm_term is traditionally for paid-search keywords, and utm_content is for distinguishing two links to the same page, such as a text link versus a button in an A/B test. Both are optional and only appear in the URL when filled in.

Should I lowercase my values?

It is a good habit. Most analytics platforms treat Email and email as two separate mediums, which fragments your reports, so pick one casing convention and stick to it across every link you build.

Is there an API?

Yes. This tool exposes a JSON endpoint that takes baseUrl, source, medium, and campaign (plus optional term and content) and returns the finished url, so you can generate tagged links in bulk from a script.

Is my data private?

Yes when built here in the browser. The link is assembled locally with no upload, so your destination URLs and campaign names never leave your device.

Learn more

Related tools