DEVELOPER TOOL

UTM Builder: Campaign URL Builder

Add UTM campaign tags to any link for tracking in Google Analytics 4. Existing parameters and #anchors are kept, values are encoded correctly, and you get a QR code and a bulk CSV export.

Where the traffic comes from
The marketing medium
Campaign, product or promo name
Campaign ID, kept exactly as typed
Paid keyword
Tells creatives or links apart
More GA4 parameters (optional)
Platform that directs the traffic
Google says: not currently reported in GA4
Google says: not currently reported in GA4

    
    
    

The QR code holds the tagged URL above, so scans from print are credited to this campaign.

Bulk mode: tag many URLs at once

Paste one URL per line. The same UTM values and options from above are applied to every line.


  

About this tool

This UTM builder adds campaign tags to a link so you can see which newsletter, ad or social post sent each visitor. Type the page address and the utm_source, utm_medium and utm_campaign values, and the tagged URL, a copy button and a QR code appear as you type. Bulk mode applies the same tags to a whole list of links and exports them as a CSV file. Google Analytics 4 reads these parameters from the page URL and reports them as session source, medium and campaign. This page is an independent tool and is not affiliated with Google. Everything runs in your browser: the URLs and values you type are not sent anywhere by this tool.

How to use the UTM builder

  1. Paste the landing page URL. It must start with http:// or https://. Existing query parameters and a #section anchor are fine.
  2. Fill in the three required fields: source, medium and campaign. Add utm_id, utm_term or utm_content when they help. The extra GA4 fields are under More GA4 parameters.
  3. Choose the clean-up options. Lowercase values and Replace spaces are on by default so the same campaign is always written the same way. They apply to every field except utm_id, which is kept exactly as typed apart from trimming.
  4. Read the warnings under the result, then click Copy URL, or download the QR code for print.
  5. For many links, paste them into bulk mode, one per line, click Tag all URLs, then copy them all or download a CSV with the original URL, the tagged URL and a status column.

What each UTM parameter means

These descriptions follow Google's help page URL builders: Collect campaign data with custom URLs. Google says you should always use utm_source, utm_medium and utm_campaign, and that missing UTM parameters show up as (not set) in reports.

ParameterWhat it identifiesExamples
utm_sourceThe referrer: the site, newsletter or place the click came fromgoogle, newsletter4, billboard
utm_mediumThe marketing mediumcpc, banner, email
utm_campaignThe product, slogan or promo codespring_sale
utm_idA campaign ID; Google says to use the same IDs as in any campaign data you uploadabc.123*
utm_termThe paid keywordrunning shoes*
utm_contentWhich creative or link was clicked, such as two call-to-action links in one emailhero-button*
utm_source_platformThe platform that directs traffic to the site, such as a buying platformSearch Ads 360, Display & Video 360
utm_creative_formatThe type of creative. Google notes it is not currently reported in Google Analytics propertiesdisplay, native, video, search
utm_marketing_tacticThe targeting criteria. Also not currently reported, per Googleremarketing, prospecting

* Our own illustrations; the other examples are Google's.

How the tagged URL is built

The URL is parsed with the browser's standard URL object, and the tags are encoded with URLSearchParams, the same form encoding that web forms use. That has a few consequences worth knowing:

Need to encode a single value by hand? Use the URL Encoder.

Case sensitivity and channel grouping

Google states that parameter values are case sensitive: utm_source=google is different from utm_source=Google, and its best-practice list says to use lowercase as a standard. If one email uses Email and the next uses email, your reports show two separate rows. That is why this tool warns whenever a final value contains a capital letter.

GA4 also sorts sessions into channels such as Email, Paid Search or Organic Social using fixed rules based mainly on the source and medium values (plus campaign name for some channels). For example, a medium of email puts the session in the Email channel. Google notes that these channel definitions are not case sensitive and cannot be edited, and traffic that fits none of the channel definitions is reported as Unassigned. Before inventing a new medium, check the rules on Google's Default channel group page.

Naming-convention tips

Worked example

The tool loads with the URL https://www.example.com/shoes/trail?size=10#reviews, source Newsletter, medium email, campaign Spring Sale 2026 and content hero button. With Lowercase values on and spaces replaced with hyphens, the values become newsletter, email, spring-sale-2026 and hero-button, and the result is:

https://www.example.com/shoes/trail?size=10&utm_source=newsletter&utm_medium=email&utm_campaign=spring-sale-2026&utm_content=hero-button#reviews

The existing size=10 parameter comes first, the four tags follow in the order source, medium, campaign, content, and #reviews stays at the very end, so the page still scrolls to the reviews. If you untick Lowercase values and set spaces to Keep, the campaign is written as utm_campaign=Spring+Sale+2026 and the tool warns about the capital letters.

Why not to tag internal links

UTM parameters describe how a visitor arrived at your site. Google's help page describes them as a way to identify the campaigns that refer traffic, and GA4 attributes sessions and key events using the UTM values it finds on page URLs. If you put UTM tags on links from one page of your own site to another, for example a homepage banner, GA4 records your internal label as if it were a traffic source. Google's own walk-through in Scopes of traffic-source dimensions shows a visitor who arrived from a Google ad, clicked a UTM-tagged link on the site, and later bought from a bookmark: the later session was credited to the UTM values, not to the ad. The internal tag takes credit that belongs to the real source and the reports fill with your own site as a "campaign". To measure internal promotions, use GA4 events instead, such as a click event on the banner. The tool warns when the source or medium looks internal, such as internal, homepage or nav, or when the source names the same domain as the destination.

Common mistakes

Use cases

Worked examples

Newsletter link. Website URL https://www.example.com/spring-sale, source newsletter, medium email, campaign spring_sale, content header_button. The tagged URL is:

https://www.example.com/spring-sale?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale&utm_content=header_button

Social post. Website URL https://www.example.com/blog/trail-guide, source instagram, medium social, campaign trail_guide_launch, content bio_link:

https://www.example.com/blog/trail-guide?utm_source=instagram&utm_medium=social&utm_campaign=trail_guide_launch&utm_content=bio_link

Google ad. Website URL https://www.example.com/running-shoes, source google, medium cpc, campaign brand_search, term running_shoes:

https://www.example.com/running-shoes?utm_source=google&utm_medium=cpc&utm_campaign=brand_search&utm_term=running_shoes

UTM naming rules

Channel preset notes

The Channel preset menu fills source and medium for you: Google Ads search (google / cpc) and display (google / display); Facebook and Instagram, with paid_social for ads and social for organic posts; and email (newsletter / email or automation / email). The Campaign template menu fills the campaign name, and your last 10 links are kept in this browser only. Presets are starting points, so edit any value before you copy.

Frequently asked questions

Is the URL I enter sent to a server?

No. The tagged URL, the QR code and the CSV file are all built by JavaScript running in your browser tab. This tool makes no network request with your links or tag values, so it is safe for unreleased campaign pages, and it keeps working if your connection drops after the page has loaded.

Why does my campaign show as (not set) in GA4?

Google says missing UTM parameters result in (not set) values in reports. The usual cause is a link tagged with only some parameters, for example utm_source without utm_campaign. Make sure every tagged link has source, medium and campaign, and check that the tags survived any redirect between the click and your landing page.

Where can I see UTM data in Google Analytics 4?

The Traffic acquisition report uses the session-scoped dimensions, such as Session source, Session medium and Session campaign, which describe how each visit started. The User acquisition report uses first-user dimensions, which show how a user first arrived.

Why are UTM parameters missing from my page path report?

Google says UTM parameters are left out of the Page path + query string and Landing page + query string dimensions in GA4. They still appear in the Page location dimension, which holds the full URL. Use the session source, medium and campaign dimensions to analyse the tags themselves.

Can I put UTM parameters after the # in a URL?

Not if you want them in the query string. Everything after # is the fragment, and the query string must come before it. A link like page#top?utm_source=x hides the tags inside the fragment. This builder always writes the tags before the # so the anchor keeps working and the tags stay in the query.

Do I need UTM tags on Google Ads links?

Usually not if auto-tagging is on. Google says that when auto-tagging and UTM tags are both present, Google Analytics uses the auto-tagged values for source, medium and the other traffic dimensions. Manually added utm_term and utm_content values are still recorded in the Manual Term and Manual Ad Content dimensions.

Which UTM values should I use for a newsletter?

Use utm_source=newsletter (or your list name), utm_medium=email, and a campaign name that describes the send, such as spring_sale. Add utm_content to tell links in the same email apart, for example header_button and footer_link.

Should I use hyphens or underscores in UTM values?

Either works as long as you use the same one everywhere. GA4 values are case-sensitive and treat spring_sale and spring-sale as different campaigns, so pick one style and lowercase everything.