How to Build Consistent UTM Links for Campaigns
Build reliable UTM links with clear naming, handle URLs that already contain parameters or fragments, and prepare links for shorteners and QR codes.
By TIG Tools editorial teamPublished October 25, 20265 min read
UTM links add campaign labels to a destination URL so analytics tools can identify where visits came from. A consistent naming scheme makes those reports easier to compare; careful handling of existing URL parts helps ensure the link still opens the intended page.
What UTM parameters do
UTM parameters are query-string values added to a URL. Common fields include:
utm_source: the platform or publisher, such asnewsletterorinstagram.utm_medium: the marketing channel, such asemail,social, orcpc.utm_campaign: the campaign name, such asspring_sale.utm_content: an optional label to distinguish creative versions or placements.utm_term: an optional label commonly used for paid search keywords.
A typical tagged URL looks like this:
https://shop.example.com/collections/spring?utm_source=instagram&utm_medium=social&utm_campaign=spring_sale
Use the fields your analytics setup supports and needs. For many campaigns, source, medium, and campaign are enough. UTM values are visible in the URL, so do not put personal, confidential, or sensitive information in them.
Choose a naming convention before building links
The most important rule is consistency. If one person uses Instagram, another uses instagram, and a third uses ig, reports may treat these as different values. The same problem occurs when a campaign is called spring-sale in one link and spring_sale in another.
Agree on a small set of rules, then share them with anyone creating campaign links. A practical convention is:
- Use lowercase for every value.
- Use one separator consistently, such as underscores or hyphens.
- Keep source names specific and recognizable:
instagram,partner_newsletter, orgoogle. - Use a consistent medium vocabulary: for example,
email,social,cpc, orreferral. - Make campaign names descriptive but not needlessly long, such as
spring_sale_2026. - Use
utm_contentonly when you need to distinguish ads, links, or creative versions.
Lowercase is a reporting convention, not a requirement for a valid URL. It reduces accidental variation, and analytics systems may distinguish values with different capitalization. Decide whether campaign names include dates, regions, or product names, and apply that choice consistently.
Before a launch, check that every person is using the same spelling for the source, medium, and campaign. A shared campaign naming sheet or short list of approved values can prevent avoidable reporting splits.
Build the URL
Start with the exact page you want people to reach, then add the UTM fields. The TIG UTM Builder can help assemble the parameters. Review the finished URL before sharing it, especially if the destination already has its own query string or a fragment.
A URL can contain a path, a query string, and a fragment. The query begins with ?; additional query parameters are separated by &. A fragment begins with # and usually points to a location within the page. The fragment belongs at the end of the URL.
When the destination already has a query string
If the URL already contains ?, add the first UTM parameter with &, not another ?.
https://shop.example.com/item?color=blue&utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale
Keep the original parameters unless you have a clear reason to change them. Replacing or duplicating an existing parameter can alter how the destination page behaves.
When the destination has a fragment
Put all query parameters before the # fragment. Anything after # is treated as the fragment, not as part of the query string sent to the server.
For example, to tag this destination:
https://shop.example.com/sale?color=blue#details
use this structure:
https://shop.example.com/sale?color=blue&utm_source=poster&utm_medium=qr&utm_campaign=spring_sale#details
The page retains its color=blue query value and its details fragment, while the UTM fields appear before the fragment. If you are unsure how a URL is divided into components, inspect it with the URL Parser.
Worked example: a printed event poster
Suppose a retailer is promoting a spring sale with a poster at a local event. The destination page already filters products by color and jumps to a details section. The team agrees to use lowercase values, underscores, poster as the source, and qr as the medium.
Destination:
https://shop.example.com/sale?color=blue#details
Tagged URL:
https://shop.example.com/sale?color=blue&utm_source=poster&utm_medium=qr&utm_campaign=spring_sale#details
This link identifies the poster as the source and the QR scan as the medium, while keeping the page's existing query and fragment. If the team later uses several poster designs, it could add a clear utm_content value such as store_window or event_table to tell those placements apart.
Check encoding and test the link
Spaces and some punctuation need encoding when used in a URL. A URL-building tool can usually handle this when you enter parameter values, but still inspect the result. Avoid manually encoding the whole URL, which can change characters that should remain URL separators. The URL Encoder / Decoder can help examine individual values when needed.
Before distributing a link:
- Check that the domain and landing page are correct.
- Confirm each UTM field is spelled as intended and uses the agreed lowercase format.
- Check that existing query parameters and fragments remain in place.
- Open the link in a browser and make sure the page loads and behaves as expected.
- If you use analytics testing tools, verify that the campaign values arrive as expected.
Watch for duplicate UTM keys, such as two utm_source parameters. Different systems may handle duplicates differently, so keep one value for each field rather than relying on an uncertain result.
Shorten the link carefully
UTM links can become long, especially when the destination has its own parameters. A URL shortener can make a link easier to display or share, but shortening does not replace the need to preserve and test the full destination.
Create and verify the complete tagged URL first, then shorten that exact URL. After shortening, open the short link and check that it redirects to the expected page with the UTM parameters still present. Some platforms or redirect setups may alter URLs, so do not assume the tags survive without testing. Use a short domain people can recognize, and avoid repeatedly shortening an already shortened link.
Use UTM links in QR codes
A QR code can encode the complete tagged URL. For printed materials, choose values that describe the placement clearly, such as utm_source=poster, utm_medium=qr, and a campaign name. If you need to compare locations or designs, use utm_content to label them consistently.
Generate the QR code only after the destination URL is final. Then scan it with a phone and confirm that it opens the correct page and preserves the campaign tags. The TIG QR Code Generator can create a code from the URL. Test the printed or displayed code at its intended size and on the material you plan to use; a code that is difficult to scan makes the link less useful.
A QR scan does not itself guarantee a particular analytics attribution result. The UTM values identify the campaign information in the URL, while the analytics platform records visits according to its own tracking setup and the visitor's browser or app environment.
Summary
- Use a shared naming convention, lowercase values, and consistent source and medium labels.
- Add UTM fields to the query string; use
&when a query already exists and keep fragments at the end. - Test the full tagged URL before shortening it, then confirm the short link preserves the tags.
- Encode the complete tagged URL in QR codes and scan-test the final code before distribution.
Try it now
Use the UTM Builder for free, right in your browser. No sign-up, and your files stay on your device.
Open UTM Builder