UTM Builder: How To Build Campaign URLs For GA4

A UTM builder is a tool that adds campaign parameters to your URLs so Google Analytics 4 can identify exactly where a click came from. You fill in values for source, medium, and campaign, and the builder generates a tagged link ready to use in ads, emails, or social posts.

When someone clicks that link, the parameters are sent to GA4 and appear in the Traffic acquisition report. This article shows you how to use Google's Campaign URL Builder, build UTMs in a spreadsheet, tag different channel types, decide between auto-tagging and manual UTMs for Google Ads, and test your links before they go live.

Using Google's Campaign URL Builder

Google's Campaign URL Builder is available at ga-dev-tools.google. Open the tool and you will see a form where you enter your website URL and the core UTM parameters: utm_source, utm_medium, and utm_campaign. Fields for utm_id, utm_term, utm_content, utm_source_platform, utm_creative_format, and utm_marketing_tactic are also available. If you are advertising an Android app, use the Play Campaign URL Builder instead; otherwise, the standard Campaign URL Builder is the right choice.

Click path: ga-dev-tools.google then Campaign URL Builderga-dev-tools.googleCampaign URL Builder
Campaign URL Builder with fields filled and generated URL

Fill in the core fields first. utm_source names the referrer (e.g., newsletter4, google). utm_medium describes the marketing medium (e.g., cpc, banner, email). utm_campaign identifies the specific promotion or product (e.g., spring_sale). The tool appends these to your base URL as query parameters, separated by ampersands. For example, https://www.example.com/?utm_source=summer-mailer&utm_medium=email&utm_campaign=summer-sale. You can add parameters in any order, but note that parameter values are case sensitive: utm_source=Google is different from utm_source=google. Use lowercase as a standard practice.

You can add optional parameters to differentiate creatives or keywords. utm_content helps when you have two call-to-action links in the same email; assign different values to see which version performs better. utm_term captures the paid keyword. Note that utm_creative_format and utm_marketing_tactic are not currently reported in Google Analytics properties, according to the official documentation. Once you have filled the fields, copy the generated URL and use it in your campaign. The values appear in the Acquisition > Traffic acquisition report under dimensions like Session source/medium and Session campaign. Keep in mind that UTM parameters are omitted in the Landing page + query string and Page path + query string dimensions; instead, the UTM information populates the Page location dimension.

Building UTMs In A Spreadsheet

When you manage many campaigns, building each URL by hand in the web tool becomes slow. A spreadsheet lets you store and reuse naming conventions, avoid typos, and generate dozens of tagged links at once. Start with a column for your base landing page URL, then add columns for each UTM parameter you plan to set: utm_source, utm_medium, utm_campaign, and any optional ones like utm_content or utm_term.

The Campaign URL Builder still helps you here. Generate one URL with the correct structure, then break it apart in the spreadsheet. For example, if your base URL is in cell A2 and the parameters are in B2 through G2, you can concatenate them with a formula. Google Sheets users can use =A2&"?utm_source="&B2&"&utm_medium="&C2&"&utm_campaign="&D2 and extend it for extra parameters. This approach enforces consistency: every row follows the same pattern, and you can apply data validation to limit source and medium values to a predefined list.

Consistency is critical because GA4 treats utm_source=Facebook and utm_source=facebook as two different sources. Use lowercase for all values. Keep a separate tab with your approved source, medium, and campaign names so anyone on the team can pick from the list. When a campaign launches, copy the generated URLs into your ad platform or email tool. This method also makes it easy to audit your UTM usage later: sort by campaign, check for missing parameters, and spot accidental duplicates.

Short on time? Analytics Art can check this in your property for you.

UTMs For Email, Social And Paid Campaigns

Email, social, and paid search campaigns each need slightly different UTM setups to keep reporting clean. For email, set utm_medium=email and use utm_source to identify the list or newsletter name (e.g., weekly-digest). Add utm_campaign for the specific send, like spring-sale-march. If your email contains multiple links to the same page, differentiate them with utm_content values such as header-logo and body-cta. That way you can see which placement drove more clicks.

For social media, set utm_medium to social or paid_social if you are running ads. Use a distinct utm_source for each platform: facebook, instagram, tiktok. Avoid lumping all social traffic under one source value. The best practices in the GA4 help center stress using only one unique source per distinct platform, and one unique medium per channel. For paid social, you might also set utm_campaign to match the ad campaign name exactly, and use utm_content to separate ad variations.

For paid search campaigns on platforms like Microsoft Ads, you can manually tag destination URLs with utm_medium=cpc and utm_source set to bing or microsoft. Include utm_term to pass the keyword. Dynamic parameters offered by the ad platform (e.g., {keyword}) let you insert the actual search term automatically, reducing manual work. Always check that your final URL uses consistent lowercase and matches your internal campaign naming. If you set one UTM parameter, Google recommends setting all relevant ones, especially utm_source, utm_medium, utm_campaign, utm_id, and utm_source_platform, to avoid (not set) values in reports.

When you link Google Ads to GA4, auto-tagging is the recommended method. It adds a gclid parameter to your ad URLs automatically, and GA4 uses that to pull in dimensions like Google Ads campaign, ad group, and keyword text. You do not need to build UTMs for Google Ads if auto-tagging is on. Check its status in your Google Ads account: click the Admin icon, then Account settings, and look under the Auto-tagging section. The box next to “Tag the URL that people click through from my ad” should be checked.

If you manually tag Google Ads URLs with UTMs while auto-tagging is also active, GA4 prioritizes the auto-tagged values for source, medium, and other traffic-classification dimensions. The manually set utm_content and utm_term values still populate the Manual Ad Content and Manual Term dimensions, so you can use both together. However, if any UTM parameter is present on a URL where the GCLID cannot be used as intended, GA4 derives all cross-channel traffic source dimensions exclusively from the UTM parameters. That is why Google strongly recommends setting all relevant UTMs if you set even one.

Manual tagging makes sense only in a special case: when your website does not allow arbitrary URL parameters and serves an error page with the gclid appended. Test this by taking a landing page URL, adding a test parameter like ?bar=Tester123, and checking if the page loads and the parameter stays in the address bar. If it fails and you cannot fix it, you can manually tag your final URLs with UTM parameters. But you will lose the extra Google Ads dimensions that auto-tagging provides, such as ad group name and network type.

Checking The URL Before You Launch

Before you send a campaign, verify that the UTM parameters survive the redirect and land correctly in GA4. Start by pasting the full tagged URL into a browser. Check that the page loads and the query string remains intact. If your site uses redirects, watch the address bar as the page resolves: the final URL should still contain the UTM parameters. Some redirects strip query parameters, which would drop your campaign data.

Next, use Google's Tag Assistant at tagassistant.google.com. Add your website domain, start a debug session, and then visit the tagged URL. Tag Assistant shows you which tags fired and the data each one sent. In GA4, open DebugView (found under Admin > Data display > DebugView) while the Tag Assistant session is running. Open the incoming page_view event and check its parameters for your campaign values. Afterwards, confirm the campaign shows up in the Traffic acquisition report once data is processed.

Another quick check: after the page loads, open your browser's developer console and look at the document.location or the network request to your GA4 endpoint. The parameters should be visible in the payload. If you notice any parameter is missing or misspelled, fix it in your source spreadsheet or ad platform before scaling the campaign. GA4 treats utm_source=Google and utm_source=google as different values, so case mistakes fragment your data. A few minutes of testing prevents hours of cleanup later.

Frequently Asked Questions

How Do I Create An UTM Code?

Use Google's Campaign URL Builder at ga-dev-tools.google. Enter your website URL, then fill in the core parameters: utm_source, utm_medium, and utm_campaign. The tool generates a complete URL with the codes appended. Copy that link and use it in your campaign.

Is Google URL Builder Free?

Yes. Google's Campaign URL Builder costs nothing to use; you fill in the form and copy the tagged URL.

What Is An UTM Builder?

A UTM builder is a tool that appends tracking parameters (utm_source, utm_medium, utm_campaign, and others) to a URL. When someone clicks the link, those parameters are sent to Google Analytics so you can see which campaigns drive traffic.

What Is UTM In A Web Link?

UTM (Urchin Tracking Module) is a set of query parameters added to a URL that tell analytics tools where the click came from. For example, utm_source=newsletter identifies the referrer, and utm_medium=email describes the channel.

How Do I Generate UTM Parameters?

You can generate them manually by appending ?utm_source=value&utm_medium=value&utm_campaign=value to your URL, or use the Campaign URL Builder to fill in a form and get the full link. Spreadsheets with concatenation formulas also work for bulk generation.

What Are Google Ads UTM Parameters?

Google Ads UTM parameters are manual tags you can add to your ad destination URLs, such as utm_source=google&utm_medium=cpc&utm_campaign=summer. However, Google recommends auto-tagging instead, which uses a gclid parameter and provides richer dimensions in GA4.