Can GA4 custom channels use source platform conditions?

The Citead team, updated

In short. GA4 custom channels can compare Source platform with exact, text, or regular-expression match types.

Definition: Yes. A GA4 custom channel can use the Source platform field in its rule, then compare the field with a string match type such as an exact match or a regular expression.

Key facts

  • Google lists Source platform among the fields supported for reporting by custom channel groups in its Custom channel groups documentation.
  • The Google Analytics Admin API documents six string match types for channel-group filters: exact, begins with, ends with, contains, full regular expression, and partial regular expression.
  • The API reference says the StringFilter match is case insensitive, while Google’s Help page says channel definitions are not case sensitive.
  • Google defines Source Platform as the platform where the traffic source for a conversion or key event was managed. It derives the value using the source and medium dimensions.
  • A channel group applies the first channel definition that matches, according to the current order of channels in the group.

How does a source platform condition work?

Source Platform is a traffic-source dimension. Google says it identifies the platform where the traffic source for a conversion or key event was managed. The value is populated through default logic using the source and medium dimensions, and both dimensions are required to identify Source Platform accurately. This makes the condition different from a rule that only tests a referring hostname or a manually supplied source value.

For example, an exact condition can be represented as follows:

Source platform exactly matches Google Ads

The value being tested is the resolved Source Platform value. Google’s documentation gives “Google Ads” as a Source platform value in its inventory and classification material. For other sources, Analytics evaluates UTM source and medium values to determine the platform. When no paid UTM medium is found, Google categorizes Source Platform as “Unlabeled”.

Which operators are available?

The Google Analytics Admin API channel-groups reference defines the StringFilter MatchType values as EXACT, BEGINS_WITH, ENDS_WITH, CONTAINS, FULL_REGEXP, and PARTIAL_REGEXP. In the channel editor, these correspond to exact matching, prefix matching, suffix matching, substring matching, and regular-expression matching. The API distinguishes full and partial regular-expression matching, so the regex mode matters when a pattern is intended to cover only the whole value or part of it.

The same reference describes StringFilter as case insensitive. Google’s Help page also states that channel definitions are not case sensitive. The separate regular expressions documentation adds that Google Analytics regex is full and case sensitive by default, while a partial regex needs metacharacters. Its example uses .*San Francisco.* to match values containing the phrase within a longer string.

How should conditions be combined and ordered?

The Admin API reference says filter expressions can use AND, OR, and NOT to combine filter criteria. Google’s custom-channel workflow lets you add condition groups and select dimensions and dimension values. A source platform rule can therefore be combined with another channel field when the configuration requires a narrower definition, subject to the behavior exposed by the channel-group editor.

Ordering affects the result when more than one channel definition matches the same traffic. Google states that traffic is included in the first channel whose definition it matches, given the current order of channels in the group. Place a specific source platform rule before a broader rule that could also accept the same traffic.

What should you check in the data?

Source Platform is populated from Analytics attribution logic, so inspect the recorded Source Platform value before choosing the comparison value. Google documents platform mappings for Google inventory and a separate UTM-based process for other sources. A source value that looks like a platform name can therefore resolve to a different Source Platform value, or to “Unlabeled”, depending on the source and medium.

Custom channel groups can be applied to reports retroactively. Google lists Acquisition reports as an example of where a custom group can be used as a primary dimension, and says custom channel groups are also available in custom reports, explorations, and audience conditions.

FAQ

Can a custom channel match Source platform exactly?

Yes. Use the exact string match type and enter the Source Platform value you want to classify, such as Google Ads. Google’s Admin API calls this match type EXACT.

Can a custom channel match part of a Source platform value?

Yes. The API reference includes CONTAINS, BEGINS_WITH, and ENDS_WITH, as well as full and partial regular-expression match types. The Help documentation’s channel example uses “matches regex” for a custom condition.

Are Source platform comparisons case sensitive?

Google documents StringFilter matching as case insensitive and says channel definitions are not case sensitive. Regex has separate behavior: Google’s regex documentation says full regex is case sensitive by default.

Sources

  1. Google Analytics Help, "Custom channel groups", undated
  2. Google for Developers, "REST Resource: properties.channelGroups", undated
  3. Google Analytics Help, "About the Source Platform dimension", undated
  4. Google Analytics Help, "About regular expressions (regex)", undated

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark