attributionUpdated 2025

GA4 Channel Grouping Logic: How Source-Medium Determines Channels

Understand exactly how GA4 uses utm_source and utm_medium to assign traffic to channels. Master the logic behind channel grouping.

9 min readattribution

David Park's LinkedIn campaign had perfect UTM parameters:

Code
utm_source=linkedin
utm_medium=social
utm_campaign=lead_gen_q4

But when he checked GA4, the campaign appeared under "Organic Social" instead of "Paid Social".

He spent $43,000 on paid ads that GA4 classified as free organic traffic. His boss thought the organic strategy was crushing it. David's paid campaigns looked like they failed.

The problem? David didn't understand how GA4's channel grouping logic actually works. One parameter wrong, and your entire attribution breaks.

🚨 Not sure what's breaking your tracking?

Run a free 60-second audit to check all 40+ ways UTM tracking can fail.

Scan Your Campaigns Free

✓ No credit card ✓ See results instantly

How GA4 Channel Grouping Works

GA4 uses a rule-based system to assign traffic to channels.

The Logic Flow

For each session, GA4:

  1. Checks the source and medium (from UTM parameters or automatic detection)
  2. Runs through channel rules in order (first match wins)
  3. Assigns session to the matching channel
  4. If no match → Assigns to "Unassigned" channel

The Rule Hierarchy

GA4 evaluates rules in this order:

  1. Paid Shopping
  2. Paid Search
  3. Paid Social
  4. Paid Video
  5. Display
  6. Paid Other
  7. Organic Shopping
  8. Organic Social
  9. Organic Video
  10. Organic Search
  11. Email
  12. Affiliates
  13. Referral
  14. Direct
  15. Unassigned (if nothing matches)

Important: The FIRST matching rule wins. Order matters.

GA4 Default Channel Grouping Rules

Traffic is assigned to Paid Shopping if:

Code
(Campaign matches regex: ^(.*(([^a-df-z]|^)shop|shopping).*)$)
AND
(Source matches regex: ^(google|bing)$)
AND
(Medium matches regex: ^(.*cp.*|ppc|paid.*)$)

In plain English:

  • Source is Google or Bing
  • Medium contains "cp", "ppc", or "paid"
  • Campaign contains "shop" or "shopping"

Example:

Code
utm_source=google&utm_medium=cpc&utm_campaign=shopping_feed
→ Paid Shopping ✅

Traffic is assigned to Paid Search if:

Code
(Source matches regex: ^(google|bing|yahoo|baidu|duckduckgo|yandex)$)
AND
(Medium matches regex: ^(.*cp.*|ppc|paid.*)$)

In plain English:

  • Source is a search engine (Google, Bing, Yahoo, etc.)
  • Medium contains "cp", "ppc", or "paid"

Examples:

Code
utm_source=google&utm_medium=cpc
→ Paid Search ✅

utm_source=bing&utm_medium=ppc
→ Paid Search ✅

utm_source=google&utm_medium=cpc&utm_campaign=brand
→ Paid Search ✅

Traffic is assigned to Paid Social if:

Code
(Source matches regex for social platforms)
AND
(Medium matches regex: ^(.*cp.*|ppc|paid.*)$)

Recognized social sources:

  • facebook
  • instagram
  • linkedin
  • twitter
  • tiktok
  • pinterest
  • reddit
  • snapchat
  • youtube (sometimes)

Examples:

Code
utm_source=facebook&utm_medium=cpc
→ Paid Social ✅

utm_source=linkedin&utm_medium=paid-social
→ Paid Social ✅

utm_source=twitter&utm_medium=ppc
→ Paid Social ✅

Why David's campaign failed:

Code
utm_source=linkedin&utm_medium=social
→ Organic Social ❌
(Medium doesn't contain "cp", "ppc", or "paid")

😰 Is this your only tracking issue?

This is just 1 of 40+ ways UTM tracking breaks. Most marketing teams have 8-12 critical issues they don't know about.

• 94% of sites have UTM errors

• Average: $8,400/month in wasted ad spend

• Fix time: 15 minutes with our report

✓ Connects directly to GA4 (read-only, secure)

✓ Scans 90 days of data in 2 minutes

✓ Prioritizes issues by revenue impact

✓ Shows exact sessions affected

Get Your Free Audit Report

Traffic is assigned to Paid Video if:

Code
(Medium matches regex: ^(.*cp.*|ppc|paid.*)$)
AND
(Source matches: youtube OR contains video-related patterns)

Examples:

Code
utm_source=youtube&utm_medium=cpc
→ Paid Video ✅

utm_source=google-youtube&utm_medium=cpc
→ Paid Video ✅

Display

Traffic is assigned to Display if:

Code
(Medium matches regex: ^(display|banner|expandable|interstitial|cpm)$)

Examples:

Code
utm_source=google&utm_medium=display
→ Display ✅

utm_source=taboola&utm_medium=display
→ Display ✅

utm_source=outbrain&utm_medium=banner
→ Display ✅

utm_source=any_source&utm_medium=cpm
→ Display ✅

Organic Shopping

Traffic is assigned to Organic Shopping if:

Code
(Campaign matches regex: ^(.*(([^a-df-z]|^)shop|shopping).*)$)
AND
(Source matches regex: ^(google|bing)$)
AND
(Medium matches regex: ^(organic|referral)$)

Example:

Code
utm_source=google&utm_medium=organic&utm_campaign=shopping_organic
→ Organic Shopping ✅

Organic Social

Traffic is assigned to Organic Social if:

Code
(Source matches social platform pattern)
AND
(Medium matches regex: ^(social|social-network|social-media|sm|social network|social media)$)
OR
(Medium is not set and source is social platform)

Examples:

Code
utm_source=facebook&utm_medium=social
→ Organic Social ✅

utm_source=linkedin&utm_medium=social-network
→ Organic Social ✅

utm_source=twitter&utm_medium=social-media
→ Organic Social ✅

utm_source=instagram (no medium)
→ Organic Social ✅

Why this is confusing for paid campaigns:

Code
utm_source=linkedin&utm_medium=social (PAID campaign)
→ Organic Social ❌ (GA4 doesn't know it's paid!)

Organic Video

Traffic is assigned to Organic Video if:

Code
(Source matches: youtube OR video platforms)
AND
(Medium matches regex for video OR social)

Examples:

Code
utm_source=youtube&utm_medium=video
→ Organic Video ✅

utm_source=youtube&utm_medium=social
→ Organic Social ✅ (social takes precedence)

Traffic is assigned to Organic Search if:

Code
(Source matches search engine)
AND
(Medium matches: organic)
OR
(Medium is not set)

Examples:

Code
utm_source=google&utm_medium=organic
→ Organic Search ✅

utm_source=bing (no medium)
→ Organic Search ✅

utm_source=duckduckgo&utm_medium=organic
→ Organic Search ✅

Note: GA4 automatically assigns organic search traffic. You rarely need manual UTMs for this.

Email

Traffic is assigned to Email if:

Code
(Medium matches: email OR e-mail OR e_mail OR e mail)
OR
(Source matches: email OR e-mail OR e_mail OR e mail)

Examples:

Code
utm_source=mailchimp&utm_medium=email
→ Email ✅

utm_source=sendgrid&utm_medium=e-mail
→ Email ✅

utm_source=email&utm_medium=campaign
→ Email ✅ (but source should be platform name)

Affiliates

Traffic is assigned to Affiliates if:

Code
(Medium matches: affiliate OR affiliates)

Examples:

Code
utm_source=cj-affiliate&utm_medium=affiliate
→ Affiliates ✅

utm_source=shareasale&utm_medium=affiliates
→ Affiliates ✅

utm_source=affiliate-wirecutter&utm_medium=affiliate
→ Affiliates ✅

Referral

Traffic is assigned to Referral if:

Code
(Medium matches: referral OR app OR link)

Examples:

Code
utm_source=partner-techcrunch&utm_medium=referral
→ Referral ✅

utm_source=mobile-app&utm_medium=app
→ Referral ✅

utm_source=partner-blog&utm_medium=link
→ Referral ✅

Auto-assigned referrals:

  • Traffic from another website (no UTMs)
  • GA4 assigns: source=referrer_domain, medium=referral

Direct

Traffic is assigned to Direct if:

Code
(Source is not set OR source = (direct))
AND
(Medium is not set OR medium = (none))

Examples:

  • User types URL directly
  • Clicks link from email client (non-tracked)
  • Clicks link from PDF, document
  • HTTPS → HTTP (referrer stripped in some browsers)

Unassigned

Traffic is assigned to Unassigned if:

Code
None of the above rules match

Common causes:

  • Conflicting source-medium pairs
  • Custom medium not matching any rules
  • Source-medium combination GA4 doesn't recognize

Examples:

Code
utm_source=google&utm_medium=social
→ Unassigned ❌

utm_source=facebook&utm_medium=organic
→ Unassigned ❌

utm_source=mailchimp&utm_medium=cpc
→ Unassigned ❌

How to Work With Channel Grouping

Strategy 1: Use Standard Mediums

Stick to GA4-recognized medium values:

Paid campaigns:

  • cpc (cost per click)
  • ppc (pay per click)
  • paid
  • paid-social

Organic campaigns:

  • social (for social platforms)
  • organic (for search engines, auto-assigned)
  • email (for email)
  • referral (for referrals)

Display campaigns:

  • display
  • banner
  • cpm

Other:

  • affiliate
  • video

Strategy 2: Match Source Type to Medium Type

Social platforms:

Code
Paid: utm_source=facebook&utm_medium=cpc
Organic: utm_source=facebook&utm_medium=social

Search engines:

Code
Paid: utm_source=google&utm_medium=cpc
Organic: utm_source=google&utm_medium=organic (auto)

Email platforms:

Code
Always: utm_source=mailchimp&utm_medium=email

Strategy 3: Test Before Launch

Validate channel assignment:

  1. Create test link with UTMs
  2. Click link yourself
  3. Check GA4 Realtime → Traffic sources
  4. Verify correct channel appears
  5. If Unassigned → Fix parameters

Example validation:

Markdown
Test: LinkedIn Ad Campaign
 
Link:
https://site.com?utm_source=linkedin&utm_medium=cpc&utm_campaign=test
 
Expected in GA4 Realtime:
- Source: linkedin
- Medium: cpc
- Channel: Paid Social ✅
 
If shows:
- Channel: Unassigned ❌
→ Fix medium parameter

Strategy 4: Create Custom Channel Groupings

If GA4's defaults don't match your needs:

  1. GA4 → Admin → Data Display → Channel Groups
  2. Create new channel grouping
  3. Define custom rules
  4. Apply to reports

Example custom grouping:

Code
Channel: Brand Social
Rules:
- Source matches: facebook|linkedin|twitter|instagram
- Campaign contains: brand

Channel: Performance Social
Rules:
- Source matches: facebook|linkedin|twitter|instagram
- Campaign contains: performance|conversion

Common Channel Assignment Mistakes

Mistake 1: LinkedIn Paid as Organic

Setup:

Code
utm_source=linkedin&utm_medium=social

Result: Organic Social (wrong for paid campaigns)

Fix:

Code
utm_source=linkedin&utm_medium=cpc

Result: Paid Social ✅

Mistake 2: Google YouTube as Unassigned

Setup:

Code
utm_source=google&utm_medium=social

Result: Unassigned (Google ≠ social)

Fix:

Code
utm_source=google-youtube&utm_medium=cpc

Result: Paid Video ✅

Mistake 3: Email as Referral

Setup:

Code
utm_source=mailchimp&utm_medium=referral

Result: Referral (wrong channel)

Fix:

Code
utm_source=mailchimp&utm_medium=email

Result: Email ✅

Mistake 4: Partner as Email

Setup:

Code
utm_source=partner-techcrunch&utm_medium=email

Result: Email (wrong channel)

Fix:

Code
utm_source=partner-techcrunch&utm_medium=referral

Result: Referral ✅

Setup:

Code
utm_source=facebook&utm_medium=organic

Result: Unassigned (organic is for search, not social)

Fix:

Code
utm_source=facebook&utm_medium=social

Result: Organic Social ✅

✅ Fixed this issue? Great! Now check the other 39...

You just fixed one tracking issue. But are your Google Ads doubling sessions? Is Facebook attribution broken? Are internal links overwriting campaigns?

Connects to GA4 (read-only, OAuth secured)

Scans 90 days of traffic in 2 minutes

Prioritizes by revenue impact

Free forever for monthly audits

Run Complete UTM Audit (Free Forever)

Join 2,847 marketers fixing their tracking daily

FAQ

Why does my traffic show as "Unassigned"?

Most common causes:

  1. Conflicting source-medium pair (e.g., google + social)
  2. Custom medium GA4 doesn't recognize
  3. Typo in source or medium
  4. Wrong platform type (e.g., email platform with social medium)

Solution: Review source-medium combination against GA4 rules above.

Can I change GA4's channel grouping rules?

You can't change the Default channel grouping, but you can:

  1. Create custom channel grouping with your own rules
  2. Use it in reports instead of default
  3. Set as default for your property

How:

  • GA4 → Admin → Data Display → Channel Groups
  • Create new grouping
  • Define custom rules

How do I test which channel my UTMs will assign to?

Method 1: Real-time test

  1. Create link with UTMs
  2. Click it
  3. GA4 → Realtime → Traffic sources
  4. Check channel assignment

Method 2: GA4 channel rules

  • Review rules in this article
  • Match your source-medium to rules manually

What if I use a social source but want it in a different channel?

You can't override default grouping for standard sources.

Options:

  1. Use different source name:

    Code
    Instead of: utm_source=facebook
    Use: utm_source=facebook-custom
    
  2. Create custom channel grouping with your own rules

  3. Use utm_campaign to differentiate in reports (keeps default channel)

Does capitalization matter for source and medium?

GA4 is case-sensitive.

Code
utm_source=Facebook ≠ utm_source=facebook (two different sources)
utm_medium=CPC ≠ utm_medium=cpc (two different mediums)

Best practice: Always use lowercase to prevent duplicates.

What happens if I don't set a medium?

GA4 assigns channels based on source alone:

  • Social platform source → Organic Social
  • Search engine source → Organic Search
  • Unknown source → Direct or Referral

Best practice: Always set both source and medium for clarity.

Can I see the exact channel rules GA4 uses?

Yes:

  1. GA4 → Admin → Data Display → Channel Groups
  2. Click "Default channel grouping"
  3. View all rules

Or: Use the rules documented in this article (comprehensive).


Related: Conflicting Channel Medium Attribution Rule

UTM

Get Your Free Audit in 60 Seconds

Connect GA4, run the scan, and see exactly where tracking is leaking budget. No credit card required.

Trusted by growth teams and agencies to keep attribution clean.