More GA4 parameters (optional)
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
- Paste the landing page URL. It must start with
http://orhttps://. Existing query parameters and a#sectionanchor are fine. - Fill in the three required fields: source, medium and campaign. Add
utm_id,utm_termorutm_contentwhen they help. The extra GA4 fields are under More GA4 parameters. - 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. - Read the warnings under the result, then click Copy URL, or download the QR code for print.
- 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.
| Parameter | What it identifies | Examples |
|---|---|---|
utm_source | The referrer: the site, newsletter or place the click came from | google, newsletter4, billboard |
utm_medium | The marketing medium | cpc, banner, email |
utm_campaign | The product, slogan or promo code | spring_sale |
utm_id | A campaign ID; Google says to use the same IDs as in any campaign data you upload | abc.123* |
utm_term | The paid keyword | running shoes* |
utm_content | Which creative or link was clicked, such as two call-to-action links in one email | hero-button* |
utm_source_platform | The platform that directs traffic to the site, such as a buying platform | Search Ads 360, Display & Video 360 |
utm_creative_format | The type of creative. Google notes it is not currently reported in Google Analytics properties | display, native, video, search |
utm_marketing_tactic | The targeting criteria. Also not currently reported, per Google | remarketing, 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:
- Existing parameters are kept as they were, in their original order, and the UTM tags are added after them. If the URL already has a UTM parameter that you are setting, such as an old
utm_source, the old one is removed so the link does not carry two different values, and a warning says so. - The fragment stays last. In a URL the query string must come before the
#fragment (RFC 3986, section 3). Pasting?utm_source=...after#reviewsby hand makes the tags part of the fragment instead of the query string. - Special characters are encoded. An
&inside a value becomes%26, soTom & Jerrycannot split into two parameters.#,=,?and+are encoded too, a space becomes+, and letters such asébecome UTF-8 percent codes like%C3%A9.
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
- Use lowercase everywhere and pick one word separator, hyphen or underscore, for the whole team.
- Follow Google's best-practice list: keep source and medium values to a short, agreed list: one source per platform (
facebook,newsletter) and one medium per channel (email,cpc,social). - Make campaign names match the campaign name in your ad or email platform, so the numbers can be compared.
- Use
utm_contentfor the creative, such ashero-buttonversusfooter-link, instead of making a new campaign for each link. - Write the conventions down in a shared sheet. The CSV from bulk mode is a good start for a link log.
- Never put personal data in a tag. Email addresses or names in a URL end up in analytics reports; see Google's guidance on avoiding personally identifiable information.
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
- Leaving out source, medium or campaign. Missing values appear as (not set).
- Mixing case and separators, such as
Spring_Sale,spring-saleandspring salefor one campaign. Each is a separate value. - Adding a second
?to a URL that already has a query string. Only the first?starts the query; the rest must be joined with&. The builder handles this for you. - Tagging Google Ads links that use auto-tagging. Google says that when both are used, GA4 takes source and medium from auto-tagging, although manual
utm_termandutm_contentstill feed the Manual Term and Manual Ad Content dimensions (Google's explanation). - Tagging internal links, covered above.
Use cases
- Email newsletters, with
utm_contenttelling the header link from the button - Social posts and bios, where each platform gets its own source
- Print flyers and posters: download the QR code here, or make a styled one with the QR Code Generator
- Product packaging that also needs a retail barcode from the Barcode Generator
- Partner and affiliate links, tagged in bulk and logged in a CSV
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
- Use lowercase. GA4 treats
Emailandemailas different values. Keep Lowercase values ticked. - Pick one separator and keep it. Underscores (
spring_sale) or hyphens (spring-sale) both work; mixing them splits your reports. Use the Spaces setting to enforce your choice. - Keep source and medium consistent. Source is where the traffic comes from (newsletter, instagram, google); medium is the type (email, social, cpc).
- Name campaigns by purpose, not by date alone, and reuse the same name across every channel in the campaign.
- Never put personal data in tags, and do not tag links between pages of your own site.
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
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.
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.
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.
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.
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.
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.
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.
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.