UTM Builder
Create a campaign tracking URL with source, medium and campaign values you can recognise in your reports. Keep the naming convention consistent across the campaign.
Create a campaign tracking URL with source, medium and campaign values you can recognise in your reports. Keep the naming convention consistent across the campaign.
Keep campaign labels consistent
Choose labels before distributing links. Source identifies the traffic origin; medium describes the channel; campaign groups the initiative. Content can distinguish creative versions, and term can hold a keyword or another agreed campaign detail. Do not put customer names, email addresses or other personal information in a public tracking URL.
Check the destination before distribution
Open the generated link and confirm the correct destination. Existing query values and fragments are preserved by this implementation. The URL provides labels; analytics installation and event tracking require their own checks.
How it works
Use URL.searchParams to set UTM values on an HTTP(S) URL, preserving other query parameters and its fragment.
Inputs
| Field | Example | Definition |
|---|---|---|
| Destination URL | https://example.com/ | Use the complete HTTP(S) address for destination url. Keep any existing query parameters and fragment that belong to the destination. |
| Campaign source | Paste the exact source text for campaign source. Spaces, quotation marks and non-ASCII characters may be meaningful; retain an unchanged copy. | |
| Campaign medium | cpc | Provide campaign medium as the source record shown by the example. The tool uses the supplied text and does not retrieve missing facts from an external account. |
| Campaign name | spring_launch | Provide campaign name as the source record shown by the example. The tool uses the supplied text and does not retrieve missing facts from an external account. |
| Campaign content | ad_01 | Provide campaign content as the source record shown by the example. The tool uses the supplied text and does not retrieve missing facts from an external account. |
| Campaign term | Provide campaign term as the source record shown by the example. The tool uses the supplied text and does not retrieve missing facts from an external account. |
Step-by-step guide
Prepare the source
Supply Destination URL, Campaign source, Campaign medium. Keep the original material so the output can be compared with it.
Build tracking URL
Check Destination URL, Campaign source, then select Build tracking URL.
Use the result
Compare the utm builder result with the unchanged source before copying or downloading it.
When to use it
Use URL.searchParams to set UTM values on an HTTP(S) URL, preserving other query parameters and its fragment. The function operates on the supplied source and listed assumptions. Confirm the output format fits the receiving workflow before copying it into a production record.
Example and scope
Example inputs: Destination URL: https://example.com/; Campaign source: google; Campaign medium: cpc; Campaign name: spring_launch; Campaign content: ad_01; Campaign term: .
The function operates on the supplied source and listed assumptions. Confirm the output format fits the receiving workflow before copying it into a production record.
Worked output
https://example.com/?utm_source=google&utm_medium=cpc&utm_campaign=spring_launch&utm_content=ad_01
Keep the displayed formula, input units and model scope with the result. Corrections or questions can be sent through the request section on this page.
Content updated: October 11, 2026