UTM parameters are labels in a link that tell your analytics where a visitor came from: Instagram, a newsletter or one specific ad. This guide covers the five parameters, how to build tagged links without mistakes and — the part most guides skip — how to make the source visible not only in a report, but on every single lead.
What UTM parameters are
They are query parameters at the end of a URL, after the ? sign. The visitor sees the usual page, while your analytics script reads the parameters and records where the visit came from:
https://example.com/catalog?utm_source=instagram&utm_medium=social&utm_campaign=black_friday&utm_content=stories_1Without UTM tracking, analytics only sees the website the visitor came from — and often not even that: clicks from messaging apps, mobile apps and email clients arrive as "direct", with no source at all.
The five parameters
| Parameter | Meaning | Example |
|---|---|---|
utm_source | Platform: where the click came from | google, instagram, linkedin, newsletter |
utm_medium | Type of traffic | cpc, social, email, referral |
utm_campaign | Campaign or promotion | black_friday, spring_sale |
utm_content | Ad variant or link placement | banner_top, stories_1 |
utm_term | Keyword in search ads | chat_for_website |
The first three are required. Google Analytics 4 groups source and medium into channels: for example, utm_medium=cpc lands in "Paid Search" or "Paid Social", email in "Email". That is why it pays to use the common utm_medium values instead of inventing your own.
How to build UTM links without mistakes
- Lowercase, no spaces. Use an underscore or a hyphen instead of a space. "Instagram" and "instagram" are two different sources for analytics.
- One naming sheet for the whole team. Write down how you name platforms and mediums — otherwise in a month your report will have fb, facebook and FB.
- External links only. Ads, social posts, newsletters, QR codes on flyers. Never tag links inside your own site — every click starts a new session.
- Test the link before launch. Open it yourself and check that the visit shows up in the realtime report.
Ready-made examples
| Where the link goes | source | medium |
|---|---|---|
| Instagram post or story | social | |
| Facebook / Instagram ads | paid_social | |
| Google Ads (search) | cpc | |
| Email newsletter | newsletter | |
| LinkedIn post | social | |
| Partner site or influencer | partner name | referral |
| QR code on a flyer | flyer | offline |
How to see the source on every lead
An analytics report tells you how many people a campaign brought in. But the salesperson calling a lead needs to know where this person came from. For that, you have to save the parameters on arrival and send them with the form. The catch: people rarely submit a form on the page they landed on. They browse the catalog, open the contact page — and the parameters disappear from the URL.
The script below remembers first-touch parameters for 30 days and adds them as hidden fields to every form on the page. Your form handler receives utm_source, utm_campaign and the rest as regular fields:
<script>
// First-touch parameters: kept for 30 days, not overwritten by a visit through a plain link
(function () {
var keys = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'];
var params = new URLSearchParams(location.search);
var found = {};
keys.forEach(function (k) { if (params.get(k)) found[k] = params.get(k); });
if (Object.keys(found).length) {
found.saved = Date.now();
localStorage.setItem('utm', JSON.stringify(found));
}
var stored = JSON.parse(localStorage.getItem('utm') || 'null');
if (!stored || Date.now() - stored.saved > 30 * 864e5) return;
// Add the parameters as hidden fields to every form on the page
document.querySelectorAll('form').forEach(function (form) {
keys.forEach(function (k) {
if (!stored[k] || form.elements[k]) return;
var input = document.createElement('input');
input.type = 'hidden';
input.name = k;
input.value = stored[k];
form.appendChild(input);
});
});
})();
</script>UTM tracking in Sitecog without code
If your site runs Sitecog, you don't need the script above: it saves the parameters the visitor arrived with during the current visit and attaches them to form leads and chat conversations. The condition is the same as for analytics: statistics collection must be allowed (where a cookie banner is required — after consent). Without it the lead still arrives, just without a source.
- in the lead card — the source, medium and campaign the visitor came with;
- in the chat — a visitor card: where they came from, UTM parameters, landing page, country;
- in the traffic stats — a report by channels, sources, campaigns and sites;
- on the Pro plan — a tagged-link builder for ads with a click count for each link.
Leads and traffic stats are included in the Basic ($29 per 30 days) and Pro ($79) plans. To get leads in Telegram as well, see website leads to Telegram. For a comparison of chat tools, see live chat for your website. If you are looking to replace Google Analytics itself, we compared seven tools in Google Analytics alternatives.
Frequently asked questions
What are UTM parameters in simple terms?
They are labels at the end of a link that tell your analytics where a visitor came from: utm_source is the platform, utm_medium is the type of traffic, utm_campaign is the campaign. The page itself does not change; only analytics tools and your CRM read them.
Which UTM parameters are required?
Three are usually enough: utm_source, utm_medium and utm_campaign. Without utm_source, Google Analytics cannot attribute the source. utm_content and utm_term are useful when you compare ads or keywords inside one campaign.
Do UTM parameters affect SEO?
Not if you only put them on external links (ads, social posts, newsletters). Never tag links inside your own site: every click would start a new session with a new source, and your reports would be wrong. For search engines, the page with and without parameters is the same page as long as it has a canonical tag.
How do I know which ad a lead came from?
Save the parameters the visitor arrived with and send them along with the lead, either as hidden form fields or through a CRM that does it for you. Then every lead shows the platform and campaign, not just the analytics report.
What is the difference between UTM and gclid?
Google Ads appends gclid itself when auto-tagging is on, and only Google Analytics and Google Ads can read it. You add UTM parameters yourself, and any system can see them: analytics, a CRM, your own script. For Google Ads you can use both.
Are UTM parameters case-sensitive?
Yes. Use lowercase without spaces: instagram, not Instagram. Analytics treats "Instagram" and "instagram" as two different sources, and your report splits in two.
