Keyflow

Search Keyflow

Find a shortcut, workflow, MCP server or skill

UTM Code Generator for Google Analytics

Free · runs in your browser

Paste your landing page, fill in source, medium and campaign, and copy a tagged link that shows up correctly in GA4 acquisition reports. Nothing you type leaves your browser.

Your campaign URL

Fill in the website URL to generate your link.

UTM parameters explained

ParameterRequiredTracksExample
utm_sourceYesWhere the traffic comes fromgoogle, newsletter, facebook
utm_mediumYesThe marketing channelcpc, email, social, referral
utm_campaignYesThe campaign or promotion nameblack_friday_2026
utm_termNoPaid search keywordrunning+shoes
utm_contentNoWhich link or ad was clicked, for A/B testsheader_cta, banner_v2
utm_idNoCampaign ID, used to join cost-data imports in GA4abc.123

Which utm_medium puts traffic in which GA4 channel

GA4 assigns every session to a default channel group from its source and medium. Pick a medium from this table and your campaign lands in the right channel instead of Unassigned.

utm_mediumGA4 channelExample
emailEmailutm_source=newsletter&utm_medium=email&utm_campaign=nov_digest
cpc, ppc, paid_searchPaid Search (with a search-engine source)utm_source=google&utm_medium=cpc&utm_campaign=brand
paid_social, cpcPaid Social (with a social-network source)utm_source=facebook&utm_medium=paid_social&utm_campaign=retargeting
socialOrganic Socialutm_source=linkedin&utm_medium=social&utm_campaign=launch_post
display, banner, cpmDisplayutm_source=gdn&utm_medium=display&utm_campaign=q4_awareness
affiliateAffiliatesutm_source=partner_name&utm_medium=affiliate&utm_campaign=holiday
referralReferralutm_source=producthunt&utm_medium=referral&utm_campaign=launch
smsSMSutm_source=twilio&utm_medium=sms&utm_campaign=flash_sale

UTM naming mistakes that break reports

  • Mixed case. Facebook and facebook show up as two sources in GA4. Lowercase everything.
  • Spaces in values. Spaces turn into %20 or + and get hard to filter. Use underscores or hyphens.
  • Made-up mediums. A medium like fb_post or blast doesn't match any GA4 channel rule, so the visit lands in Unassigned. Use email, social, cpc, referral, display or affiliate.
  • Tagging internal links. A UTM on a link inside your own site starts a new session and wipes the real source.
  • Changing names mid-campaign. Renaming blackfriday to black_friday halfway through splits one campaign into two rows.

Automate it with n8n

Creating links for every post by hand? The free UTM link creator and QR code generator workflow builds tagged links and emails you a scheduled Google Analytics report, and Automate Google Analytics reporting pulls campaign numbers into a sheet every week.

Questions

A UTM code is a set of query parameters (utm_source, utm_medium, utm_campaign and optionally utm_term, utm_content, utm_id) added to the end of a URL. Google Analytics reads them to tell you which campaign, channel and link sent each visitor.

Google Analytics needs utm_source, utm_medium and utm_campaign to attribute a session properly. utm_term, utm_content and utm_id are optional.

Yes. GA4 treats “Email” and “email” as two different mediums, which splits your reports. Keep every value lowercase; the builder above does this by default.

No. A UTM on a link between pages of your own site starts a new session and overwrites the original source, so the visit gets credited to the wrong channel. Only tag links that point to your site from somewhere else.

Go to Reports → Acquisition → Traffic acquisition and switch the primary dimension to Session source / medium or Session campaign. For a custom breakdown, open Explore and add Session campaign, Session source and Session medium as dimensions.

GA4 sorts sessions into channels using the utm_medium (and sometimes utm_source) value. If the medium doesn't match one of its rules, such as email, social, cpc, display, affiliate or referral, the session is put in Unassigned. Rename the medium to a standard value.

Usually not. With Google Ads linked to GA4 and auto-tagging on, the gclid parameter already carries campaign data. Add UTMs to Google Ads only if you send the traffic to a tool that can't read gclid.

Not when the landing page has a canonical tag pointing at the clean URL. Google consolidates the tagged variants onto the canonical, so tagged campaign links do not create duplicate content.