Ecommerce UTM builder.
Pick a channel, choose the campaign type and product or category, and the campaign name follows one convention every time.
Free · runs in your browser · nothing uploaded
Five tags, one link
What UTM tags actually do.
UTM tags are short labels added to the end of a link. When someone clicks, your analytics reads the labels and records exactly where the visit came from.
No extra code is needed for GA4 to read them. The five standard tags answer five questions about every visit, and GA4 uses the source and medium to decide which channel the visit belongs to.
The five tags
| Tag | Answers | Example |
|---|---|---|
utm_source | Where did the click come from? | google, facebook, newsletter |
utm_medium | What type of traffic is it? | cpc, paid_social, email |
utm_campaign | Which campaign was it? | spring-sale_202611 |
utm_content | Which ad or link was clicked? | hero-banner, video-a |
utm_term | Which keyword or audience? | running shoes |
Four reasons to tag every link
Why it matters for reporting.
01
Credit goes to the right campaign.
Without tags, a click from an email or WhatsApp message often shows up as Direct, and the campaign that earned it gets no credit.
02
Channels are compared fairly.
One naming convention across every channel means paid, owned and partner traffic line up in the same report.
03
Leads and revenue connect to marketing.
Stored with each lead, UTM tags show which campaign produced customers, not just clicks.
04
Budget follows results.
Clean data shows which ads and messages to scale and which to stop.
From link to report
Tag the link. Then trust the report.
Use the builder
Step 01
Paste the product, collection or landing page.
Step 02
Pick the channel.
Shopping presets add the "shopping" marker so GA4 files clicks under Paid Shopping.
Step 03
Build the campaign name from type, event, category, offer, market and date.
Add the creative format and angle (or creator) as content.
Step 04
Copy the link, log it as a spreadsheet row, or download a QR code for package inserts.
The naming convention
Pattern{type}_{category}_{date}
Examplesale_womens-shoes_202611
Parts are joined with underscores and words inside a part use hyphens, so you can split the name back into columns in a spreadsheet or Looker Studio. Optional parts are skipped when empty. You can switch the separator under Formatting rules.
Source, medium and GA4 channel
Every channel, mapped to GA4.
The source and medium each preset uses, and the GA4 default channel it reports under. Unassigned means GA4 has no default rule for it; add a custom channel group rule.
| Channel | utm_source | utm_medium | GA4 channel |
|---|---|---|---|
| Google Ads: Shopping | google | cpc | Paid Shopping |
| Google Ads: Performance Max | google | cpc | Paid Search |
| Google Ads: Search | google | cpc | Paid Search |
| Microsoft Advertising | bing | cpc | Paid Search |
| Facebook ads | facebook | paid_social | Paid Social |
| Instagram ads | instagram | paid_social | Paid Social |
| TikTok ads | tiktok | paid_social | Paid Social |
| Snapchat ads | snapchat | paid_social | Paid Social |
| Pinterest ads | pinterest | paid_social | Paid Social |
| Google Ads: Display | google | display | Display |
| Google Ads: Demand Gen | google | cpc | Paid Search |
| YouTube ads | youtube | cpv | Paid Video |
| Criteo retargeting | criteo | retargeting | Paid Other |
| Email campaign | newsletter | email | |
| Email automation (flow) | automation | email | |
| SMS | sms | sms | SMS |
| App push | app | push | Mobile Push Notifications |
| WhatsApp message or broadcast | whatsapp | social | Organic Social |
| Facebook post | facebook | social | Organic Social |
| Instagram bio or story | instagram | social | Organic Social |
| Affiliate network | affiliate-network | affiliate | Affiliates |
| Coupon or cashback site | coupon-site | affiliate | Affiliates |
| Influencer (Instagram) | instagram | influencer | Organic Social |
| Influencer (TikTok) | tiktok | influencer | Organic Social |
| Marketplace store link | amazon | referral | Organic Shopping |
| Package insert QR | package-insert | qr | Unassigned |
| Print or poster QR code | print | qr | Unassigned |
For ecommerce marketers
Tips that keep the data clean.
01
Give email flows their own source, such as "automation", so always-on revenue is not mixed with one-off campaign sends.
02
Tag every influencer link, and put the creator handle in utm_content.
Discount codes alone miss everyone who clicks and buys without the code.
03
Use "shopping" in Shopping and PMax feed campaigns where you want GA4 to separate product-ad revenue from search ads.
04
Name sale events the same way every year (white-friday, not wf or whitefriday) so you can compare year on year.
05
Check that your checkout keeps the UTMs.
Third-party payment pages often show up as referrals and steal the credit unless they are excluded.
Store UTMs with every lead
Get UTM data into your CRM.
GA4 counts visits. Your CRM or database records who became a lead or customer. Unless the UTM tags are saved with each record, the two never meet, and you can't tell which campaign produced which sale. Share this brief with your website developer.
What to ask for
Step 01
Read the UTM tags and ad click IDs from the URL on every page load.
Step 02
Save them in a first-party cookie for 90 days.
Keep a first-touch copy that is never overwritten, and a last-touch copy that updates on each new tagged visit.
Step 03
Ignore visits without UTM tags, so an untagged return visit never wipes the saved values.
Step 04
Add hidden fields for every value to every form: contact, booking, sign-up and checkout.
Step 05
Fill the hidden fields from the cookie when the form is sent.
Step 06
Store each value in its own column on the lead or order record, and map the same fields into the CRM.
Step 07
Test it: open a tagged link, send a form, and check the record shows the right values.
Fields to add to each lead or order
| Field | What it holds |
|---|---|
first_utm_source … first_utm_term | First tagged visit. Set once, never overwritten. |
last_utm_source … last_utm_term | Most recent tagged visit before the form was sent. |
gclid, fbclid, msclkid | Ad click IDs, for offline conversion uploads. |
landing_page | Full URL of the first page seen. |
referrer | The site the visitor came from. |
first_touch_at, last_touch_at | Timestamps of both visits. |
A starting point for the developer
const KEYS=['utm_source','utm_medium','utm_campaign','utm_content','utm_term','gclid','fbclid','msclkid'];
const q=new URLSearchParams(location.search);
const hit={};KEYS.forEach(k=>{if(q.get(k))hit[k]=q.get(k);});
if(Object.keys(hit).length){
hit.landing_page=location.href;hit.referrer=document.referrer;hit.at=new Date().toISOString();
const save=(n,v)=>document.cookie=n+'='+encodeURIComponent(JSON.stringify(v))+';path=/;max-age=7776000;SameSite=Lax';
if(!document.cookie.includes('utm_first='))save('utm_first',hit);
save('utm_last',hit);
}Request: store UTM data with every lead and order
Why: GA4 shows visits. Our database shows leads and sales. Saving the UTM tags with each record tells us which campaign produced each lead and how much revenue it brought in.
Steps:
1. Read the UTM tags and ad click IDs from the URL on every page load.
2. Save them in a first-party cookie for 90 days. Keep a first-touch copy that is never overwritten, and a last-touch copy that updates on each new tagged visit.
3. Ignore visits without UTM tags, so an untagged return visit never wipes the saved values.
4. Add hidden fields for every value to every form: contact, booking, sign-up and checkout.
5. Fill the hidden fields from the cookie when the form is sent.
6. Store each value in its own column on the lead or order record, and map the same fields into the CRM.
7. Test it: open a tagged link, send a form, and check the record shows the right values.
Fields to add:
- first_utm_source … first_utm_term: First tagged visit. Set once, never overwritten.
- last_utm_source … last_utm_term: Most recent tagged visit before the form was sent.
- gclid, fbclid, msclkid: Ad click IDs, for offline conversion uploads.
- landing_page: Full URL of the first page seen.
- referrer: The site the visitor came from.
- first_touch_at, last_touch_at: Timestamps of both visits.
Starting point:
const KEYS=['utm_source','utm_medium','utm_campaign','utm_content','utm_term','gclid','fbclid','msclkid'];
const q=new URLSearchParams(location.search);
const hit={};KEYS.forEach(k=>{if(q.get(k))hit[k]=q.get(k);});
if(Object.keys(hit).length){
hit.landing_page=location.href;hit.referrer=document.referrer;hit.at=new Date().toISOString();
const save=(n,v)=>document.cookie=n+'='+encodeURIComponent(JSON.stringify(v))+';path=/;max-age=7776000;SameSite=Lax';
if(!document.cookie.includes('utm_first='))save('utm_first',hit);
save('utm_last',hit);
}Never put names, emails or phone numbers in UTM tags. Store them only in your own database, under your privacy policy.
The ones that come up most
Common questions.
01Why do my Google Shopping clicks show as Paid Search in GA4?
GA4 only reports Paid Shopping when the source is a known shopping site or the campaign name contains "shop" or "shopping". Google is a search engine, so a campaign called "summer-sale" from google / cpc becomes Paid Search. Adding "shopping" to the campaign name fixes it, which is what the Shopping preset in this builder does.
02Should I use UTMs and discount codes for influencers?
Use both. Codes catch buyers who type them in later, and UTMs catch people who click and buy without a code. Put the creator handle in utm_content so each creator has their own row in GA4.
03Do UTMs conflict with Meta's fbclid or Google's gclid?
No. Click IDs are added automatically by the platforms and work alongside your UTMs. Just don't paste a click ID into a link you are building, because it belongs to one specific click.
04How do I tag email flows such as abandoned cart?
Use medium email, a dedicated source such as "automation", and a campaign name that describes the flow, for example "abandoned-cart_all-products_uae". Many email platforms can add UTMs automatically; match their settings to the same convention.
05What should I use for marketplace links such as Amazon?
Links from your marketplace store to your own site can use source amazon and medium referral. GA4 recognises Amazon as a shopping site and reports it as Organic Shopping.