utm_source vs utm_medium: the difference, with examples
By Devendra Variya, co-founder of Virling. Published 2026-11-24.
utm_source says where the link is: the site, app, list or partner, such as linkedin or newsletter. utm_medium says what kind of channel that is, such as social, email or cpc. A LinkedIn post and a LinkedIn ad share the source linkedin; the medium, social or paidsocial, tells them apart. If a value is a name, it is a source. If many places could share it, it is a medium.
utm_source and utm_medium side by side
| utm_source | utm_medium | |
|---|---|---|
| Question it answers | Which place? | What kind of channel? |
| How many values | One per site, list or partner | A short, fixed list |
| When it changes | With each new place | With each new kind of channel |
| Example values | google, linkedin, newsletter, acme-agency | cpc, social, email, referral |
| In Virling | Decides the channel when there is no referrer and the medium has not | Decides Paid and Email, before anything else |
Google describes them the same way in its campaign URL guide: the source is the referrer, for example google, newsletter4 or billboard, and the medium is the marketing medium, for example cpc, banner or email. For the other three tags, see which UTM parameters to use to trace revenue and utm_content vs utm_term.
Right and wrong pairs
Each pair is source / medium. The newsletter and partner names are made up. The last column also says what the wrong pair does in Virling.
| Link | Right | Wrong, and what it does |
|---|---|---|
| Search ad | google / cpc | cpc / google. Swapped. A click from google.com counts as Organic search, not Paid |
| Social ad | linkedin / paidsocial | linkedin / paid-social. The hyphenated value is not a paid medium, so the ad counts as Social with your unpaid posts |
newsletter / email | email / digest. The medium is not an email value, so a click with no referrer is Referral, not Email | |
| Social post | linkedin / social | social / linkedin. Swapped. With no referrer, social is not a known source, so the click is Referral |
| Partner | acme-agency / referral | partner / acme-agency. Every partner shares one source, and each one adds a new medium |
| QR code | qr / print | qr / spring-flyer. Each flyer adds a new medium. Put the flyer in utm_campaign |
The same pairs as links
https://example.com/pricing?utm_source=google&utm_medium=cpc&utm_campaign=brand-search https://example.com/pricing?utm_source=linkedin&utm_medium=paidsocial&utm_campaign=spring-launch https://example.com/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=spring-launch https://example.com/pricing?utm_source=linkedin&utm_medium=social&utm_campaign=spring-launch https://example.com/pricing?utm_source=acme-agency&utm_medium=referral&utm_campaign=acme-agency https://example.com/pricing?utm_source=qr&utm_medium=print&utm_campaign=qr-spring-flyer
The UTM builder makes these from a page URL, and the UTM naming template gives your team one table of sources and mediums to copy from.
How Virling uses each one
Every visit gets one channel from its first page. The rules run in this order and the first match wins:
- The medium, for Paid and Email only.
cpc,ppc,paid,paidsearch,paid_socialorpaidsocialis Paid.email,newsletterore-mailis Email. The referrer and the source cannot change that. - The referrer, when there is one. With any other medium, the site the click came from decides: AI, Organic search, Communities, Social or Referral.
- The source, when there is no referrer. A known name such as
chatgpt,google,redditorlinkedingives its channel. Any other value is Referral. Whenutm_sourceis missing,refis used. - With no referrer and no source, a known in-app browser gives the visit to its app. Otherwise any other medium is Referral, and no medium is Direct.
So utm_medium=social does not make a visit Social by itself: the referrer or the source does. The known hosts and source names are listed in how channels are decided.
Neither tag has a tab of its own. The Source tab lists the sites that sent the visit. With no referrer, a source typed as a known domain, such as linkedin.com, shows there, and a bare name such as linkedin sets the channel but no row. To get a row with visitors and revenue for each link, give it its own utm_campaign, which fills the Campaign tab.
What the medium changes in a report
These numbers are made up to show the reading. One source, linkedin, with two mediums: posts tagged social, which land in Social, and ads tagged paidsocial, which land in Paid.
| Channel | Visitors | Revenue | Revenue per visitor |
|---|---|---|---|
| Social | 600 | $180 | $0.30 |
| Paid | 150 | $225 | $1.50 |
If the ad had been tagged social too, both would be one Social row of 750 visitors, $405 and $0.54 per visitor. You could not tell whether the ad paid for itself. To see this with your own payments, connect your payment provider and link checkout to visits.
Common mix-ups
- The two are swapped.
utm_source=email&utm_medium=newsletterstill lands in Email in Virling, becausenewsletteris an email medium, but the source no longer says which list it was. - The same word in both.
linkedin / linkedinsays nothing about whether it was a post or an ad. - The payment type is in the source.
linkedin-adssplits one platform into two sources. Keeplinkedinand let the medium say it is paid. The tracking parameters builder for LinkedIn ads starts from that pair, withpaid_socialas the medium. - The campaign is in the medium.
utm_medium=black-fridaybelongs inutm_campaign. A medium should still make sense next year. - A new spelling of a medium.
Paid Social,paid-socialandsocial-paidare three values, and none of them is a paid medium in Virling. - The email tool is the source. Your email software is not where the reader is. Name the list or the series, so the source survives a change of tool.
- Another newsletter, sponsored. Its name is the source. Choose
emailorcpcas the medium once, depending on whether you count it with your emails or your ads, and keep to it.
How to fix links you already shared
A tag is read when the page loads, so a fix changes only the visits that come after it. Start with the links that still get clicks.
- List the links. Put each URL in a sheet with one column for the source and one for the medium. Read down the medium column: every platform, list or partner name in it is a mix-up.
- Check the spelling. Paste the links into the UTM checker to find capitals, spaces, duplicates and missing tags. It does not know which of your names is a source, so swapped pairs need your own eyes.
- Edit what you can. Profile links, ad URLs, email templates and automations, scheduled posts and pages a partner can change for you. Keep
utm_campaignas it was, so old and new visits stay in one Campaign row. - Redirect what you cannot edit. A sent email or a printed code keeps its link. If it goes through a short link whose target you can change, change that. Otherwise add a rule on your own site that redirects the exact wrong pair to the right one and keeps the rest of the query string. A Virling tracked link cannot be changed after you make it.
- Write down the date. Compare channels before and after it with care. In Virling, a visit keeps the channel it was given, and a payment can still be credited to an older visit inside the lookback window, 90 days by default.
- Test one link of each kind. Open it in a private window and see that both tags are still in the address bar after any redirect.
Frequently asked questions
What is the difference between utm_source and utm_medium?
utm_source names the exact place the link is, such as linkedin or newsletter. utm_medium names the kind of channel, such as social, email or cpc. One source can have several mediums, and one medium covers many sources.
Is Google a source or a medium?
A source. For a Google Ads link, the source is google and the medium is cpc. Do not tag organic search results at all: the search engine already sends a referrer.
Is email a source or a medium?
A medium. Use utm_medium=email and put the list or the sender in the source, such as utm_source=newsletter.
Do I need both utm_source and utm_medium?
Put both on every link. Without a medium, a paid or email link cannot be told apart from an ordinary one. Without a source, you know the kind of channel but not the place.
Are utm_source and utm_medium case sensitive?
In Google Analytics, yes: Google says utm_source=google is different from utm_source=Google. Virling ignores case when it decides the channel, but lowercase keeps the values the same in every tool.
Does changing a UTM tag fix old visits?
No. A visit keeps the tags it landed with, and in Virling the channel it was given then. A corrected link changes only the visits that come after it.
See the revenue behind every channel and campaign
Virling is open source under AGPL. Self-host it free, or use the hosted version with a 14-day free trial. It connects to Stripe, Paddle, Shopify, WooCommerce, Polar, LemonSqueezy, Dodo, Creem and RevenueCat.