OnSumo Tools

UTM Link Builder

Build UTM tracking links with live preview, see how tags map to GA4, and generate copy-ready URLs for every channel in one pass.

100% client-side. Campaign inputs stay in your browser (ons-utm-builder-inputs).

Full tracking URL

https://example.com?utm_source=google&utm_medium=cpc&utm_campaign=spring-sale-2026

GA4 preview

In GA4 this appears as: Source=google / Medium=cpc / Campaign=spring-sale-2026

Base URL

UTM parameters

How this tool works

UTM parameters are query-string tags appended to a URL so that analytics platforms like GA4 can attribute sessions to specific traffic sources. The three required fields are utm_source (the referrer, e.g. google, newsletter), utm_medium (the channel type, e.g. cpc, email, social), and utm_campaign (the initiative name, e.g. spring-sale-2026). Two optional fields are utm_term (the paid search keyword) and utm_content (distinguishes creative variants within the same campaign, e.g. banner-v1 vs banner-v2). The tool normalizes all values to lowercase and replaces spaces with hyphens so GA4 does not split the same campaign across casing variants. Bulk mode lets you build multiple links in one step: paste the same base URL and campaign name once, then enter source and medium per row. Key assumption: your base URL must not already contain UTM parameters; if it does, the tool appends to the existing query string, and duplicate keys will cause GA4 to record only the first value. Edge case: for non-ASCII characters in campaign names (e.g. Spanish or Arabic text), the tool percent-encodes the parameter values; test that your analytics platform decodes them correctly before scaling the campaign.

Worked example

Campaign: spring-sale-2026. Base URL: https://shop.example.com/sale. Three channels: (1) Google Search CPC — utm_source=google, utm_medium=cpc, utm_campaign=spring-sale-2026, utm_term=running-shoes, utm_content=responsive-search-ad. Built URL: https://shop.example.com/sale?utm_source=google&utm_medium=cpc&utm_campaign=spring-sale-2026&utm_term=running-shoes&utm_content=responsive-search-ad. (2) Facebook social — utm_source=facebook, utm_medium=social, utm_campaign=spring-sale-2026, utm_content=carousel-v2. (3) Email newsletter — utm_source=newsletter, utm_medium=email, utm_campaign=spring-sale-2026, utm_content=header-cta. Bulk mode outputs all three URLs in one session. GA4 will show three distinct rows in the Traffic Acquisition report under the spring-sale-2026 campaign, each attributed to its channel.

Frequently asked questions

  • What are UTM parameters?

    UTM parameters are tags appended to URLs that pass traffic source data to analytics platforms like Google Analytics 4 or Adobe Analytics. There are five standard parameters: utm_source identifies the traffic origin (e.g., google, newsletter, facebook); utm_medium identifies the channel type (e.g., cpc, email, social); utm_campaign identifies the specific campaign; utm_term captures the paid keyword; and utm_content distinguishes between ads or links within the same campaign. Without UTM tags, GA4 cannot attribute traffic from emails, social posts, or partner links accurately.

  • Are UTM parameters case-sensitive?

    Yes. Google Analytics 4 treats utm_source=Facebook and utm_source=facebook as two separate sources, splitting your reporting. Establish a lowercase-only convention across your organization and enforce it. Common problem areas include capitalized campaign names, mixed-case source values, and spaces (which become %20 in URLs). The best practice is to define a UTM taxonomy document with approved values for source, medium, and campaign name formats, then use a builder tool like this one to enforce consistency rather than building URLs manually.

  • Can I use UTM links on social media?

    Yes, and you should on any organic social post where you want to measure traffic. Paste the full UTM URL directly into the post or link field. URL shorteners such as bit.ly or rebrandly preserve UTM parameters through the redirect, so shortening a UTM URL does not break tracking. For paid social ads on Facebook, Instagram, or LinkedIn, the ad platform populates utm_source and utm_medium automatically if you configure URL parameters in the campaign settings, but you should still add utm_campaign and utm_content manually to distinguish campaigns and ad variants.

  • What is utm_content used for?

    utm_content distinguishes between multiple links or ads pointing to the same destination URL within the same campaign. The most common use is A/B testing: if you run two creative versions of an ad, set utm_content=version-a and utm_content=version-b to see which drives more conversions. It is also useful for differentiating links in a single email (e.g., top-banner vs. footer-cta) or multiple placements in a newsletter, so you know which specific link placement drove the click.

  • How long does UTM data stay in Google Analytics 4?

    GA4 retains event data for 14 months by default, or up to 50 months if you change the data retention setting in Admin > Data Settings > Data Retention. UTM attribution in GA4 uses a session-scoped model by default: the UTM parameters apply to all events in the session where the tagged link was clicked. GA4 also stores the first-touch campaign data in user properties (first_user_source, etc.) for the lifetime of the user record, enabling both session and lifetime attribution reporting.

  • Why should I never add UTM parameters to internal links?

    Adding UTM tags to links between your own pages resets the session source in GA4, overwriting the original attribution with an internal source. If a user arrives from a Google ad, clicks an internally UTM-tagged link on your homepage, and then converts, GA4 records the conversion source as your internal tag, not Google. This corrupts your channel attribution data and understates the value of paid and organic acquisition channels. UTM parameters belong only on external links pointing to your site. Use GA4 internal promotion tracking or content groups for measuring internal navigation instead.

Related tools