Sub topic 14
Building custom channel groups
This chapter assumes you can already read the Traffic acquisition and User acquisition reports. It also assumes you know how source, medium, and campaign feed the default channel group. Here you will build your own grouping for traffic that the default rules classify poorly or too coarsely.
Why build your own
The default channel group is fixed. You cannot edit its rules. It maps traffic to channels such as Organic Search, Paid Social, and Email using Google's definitions of source and medium. Those definitions often don't match how your business thinks about traffic. Common mismatches:
- Your partner traffic arrives as
referral, so it sits with every other referral. - Brand and non-brand paid search are both "Paid Search".
- Your email platform sends
utm_medium=newsletter, which the default group doesn't recognize as Email. - Campaign names carry a region or product line you want as a reporting category.
A custom channel group lets you define your own channels and the rules that assign traffic to them. The default group stays available, so you can compare the two.
What a custom channel group is
A custom channel group is a property-level list of channels. Each channel has a name and one or more conditions. GA4 evaluates the channels in order, from top to bottom. A session or user goes into the first channel whose conditions match. Traffic that matches no channel falls into a catch-all, shown as Unassigned.
Three properties matter in practice:
- Order matters. Put narrow rules above broad ones. A "Paid Search" channel above "Brand Paid Search" would swallow all brand traffic.
- Evaluation happens at report time. A custom group applies to historical data too, not only to traffic collected after you create it. Changing a rule changes past numbers.
- It is a reporting layer. It does not change the stored source, medium, or campaign. It does not affect your Google Ads links, and it doesn't appear in the BigQuery export.
Creating one
You need the Editor role on the property. Then:
- Open Admin, go to Data display, and choose Channel groups.
- Select Create new channel group.
- Name the group, for example
Marketing team channels. - Start from the default channels or build from scratch. Starting from a copy of the default channels is usually easier. You then edit, delete, or reorder channels.
- Add a channel with Add new channel. Give it a name and add conditions.
- Drag channels into the right order, then save.
Each condition picks a dimension, an operator, and a value. Useful dimensions include Source, Medium, Source / medium, Campaign, and Default channel group. Operators include exactly matches, contains, begins with, ends with, and matches regex.
Combine conditions with AND or OR. The OR option is how you fold several spellings of one source into a single channel.
Example channel definitions
| Channel | Conditions | Why | Column |
|---|---|---|---|
| Brand Paid Search | Medium exactly matches `cpc` AND Campaign contains `brand` | Separates brand terms from generic spend | |
| Partners | Medium exactly matches `referral` AND Source matches regex `^(partner-a\.com\ | partner-b\.com)$` | Pulls named partners out of generic referral |
| Newsletter | Medium exactly matches `newsletter` OR Medium exactly matches `email` | Merges two spellings into one channel | |
| Social (all) | Default channel group matches regex `^(Organic Social\ | Paid Social)$` | Combines paid and organic social |
Place Brand Paid Search above any broader paid search channel. Place Partners above any channel that matches all referrals.
Regex behavior
In GA4, "matches regex" requires the pattern to match the entire value. A pattern such as brand will not match spring_brand_2026. Use .*brand.*, or use the "contains" operator instead. Regex is case-sensitive by default, so normalize your UTM values to lowercase. Chapter 4's tagging advice pays off here.
Using the group in reports
A custom group appears as its own set of dimensions. The names carry the scope:
| Scope | Dimension in the interface | Data API name |
|---|---|---|
| Session | Session primary channel group (your group name) | `sessionPrimaryChannelGroup` |
| First user | First user primary channel group (your group name) | `firstUserPrimaryChannelGroup` |
| Event | Primary channel group (your group name) | `primaryChannelGroup` |
The scope rules from earlier chapters still apply. Use the session-scoped dimension in the Traffic acquisition report. Use the first-user dimension in the User acquisition report. Mixing scopes gives numbers that look inconsistent but are not wrong.
In the standard reports, use the dimension selector above the table to switch from the default channel group to your custom one. In Explorations, drag the custom dimension into rows or filters like any other.
For the Data API, reuse the request body from the earlier chapter and swap the dimension. Replace YOUR_GROUP with nothing. The API name is the same for every custom group, and the property's primary group is the one returned.
{
"dateRanges": [{ "startDate": "28daysAgo", "endDate": "yesterday" }],
"dimensions": [
{ "name": "sessionPrimaryChannelGroup" },
{ "name": "sessionSourceMedium" }
],
"metrics": [
{ "name": "sessions" },
{ "name": "engagedSessions" },
{ "name": "keyEvents" }
],
"orderBys": [{ "metric": { "metricName": "sessions" }, "desc": true }],
"limit": 20
}Checking your work
Build the group, then verify it before anyone relies on it:
- Open Traffic acquisition and switch to your custom group.
- Add Session source / medium as a secondary dimension.
- Expand each channel and confirm that the source/medium rows inside it belong there.
- Look at Unassigned. Every source/medium row listed there is a rule you have not written yet.
- Compare total sessions against the default group. The totals must match, because only the labels change.
If the totals differ, check your date range and any filters, not the channel rules. Grouping never creates or removes sessions.
Limits and gotchas
- Not in BigQuery. The export holds raw fields only. To reproduce a custom group there, write the same logic as a
CASEexpression, in the same order as your channels. - Logic drift. A rule edited in the interface does not update your SQL. Keep one documented definition and change both together.
- Editing rewrites history. A rule change alters past reports. Record the date and reason, since a stakeholder may remember the old numbers.
- Property-wide. All users of the property see the group. Name it clearly.
- It can't fix bad tagging. If
utm_mediumis inconsistent, rules will multiply to cover every variant. Fix the tagging first.
Here is the BigQuery equivalent of two channels. It uses the first-user fields, so it matches the user-scoped view:
SELECT
CASE
WHEN traffic_source.medium = 'cpc'
AND REGEXP_CONTAINS(LOWER(IFNULL(traffic_source.name, '')), r'brand')
THEN 'Brand Paid Search'
WHEN traffic_source.medium IN ('newsletter', 'email')
THEN 'Newsletter'
ELSE 'Unassigned'
END AS custom_channel,
COUNT(DISTINCT user_pseudo_id) AS users
FROM `my_project.analytics_123456789.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20260101' AND '20260131'
GROUP BY custom_channel
ORDER BY users DESC;The CASE expression returns the first matching branch, which mirrors GA4's top-to-bottom evaluation.
Exercise
Your group has a channel "Paid Search" (Medium exactly matches cpc) listed above "Brand Paid Search" (Medium exactly matches cpc AND Campaign contains brand). Brand Paid Search always shows zero sessions. Why, and how do you fix it?
Show answer
GA4 assigns each session to the first channel that matches. Every brand session also matches the broader Paid Search rule, so it never reaches the Brand Paid Search rule. Drag Brand Paid Search above Paid Search and save. Brand sessions then match first, and the remaining cpc sessions fall through to Paid Search.
Exercise
You create a custom group and the session total in Traffic acquisition is 4% lower than under the default group. Is the grouping the cause?
Show answer
No. A channel group only relabels sessions and cannot change how many exist. Compare the date ranges, comparisons, and filters applied to each view. They are the likely cause.