Campaign tags should explain where a visit came from without breaking the destination link. The tricky case is a URL that already contains a query string or a fragment.
Start with the destination URL
A campaign URL is an ordinary page URL with extra query parameters. If the destination already has ?ref=partner, new parameters must be appended with &. If it has #pricing, the fragment stays after the full query string. A URL parser handles both cases more reliably than joining strings by hand.
Before sharing a tagged link, open the generated URL in a browser and confirm that the intended page still loads. This is especially important when the destination uses its own filters, referral codes, or checkout parameters.
https://example.com/pricing?ref=partner&utm_source=newsletter&utm_medium=email&utm_campaign=autumn#plansGive each field one job
Choose a naming convention before sending the first campaign. In reporting, Email and email can become separate values. Lowercase source and medium names make filtering easier. Avoid changing conventions halfway through a campaign; document the names in a shared sheet if several people create links.
- utm_source identifies the origin, such as newsletter or linkedin.
- utm_medium identifies the channel, such as email, cpc, or paid-social.
- utm_campaign names the initiative in a form your team can reuse consistently.
- utm_term and utm_content are optional; use them for keyword or creative variants only when useful.
Check before publishing
- Verify the destination, including its existing parameters and page fragment.
- Confirm source, medium, and campaign are filled and spelled consistently.
- Copy the final URL and test it in a private browser window.
- Keep personal information out of UTM values because URLs may be logged and shared.