account | array (also accepts a comma-separated string) | No | - | The GA4 property to change. Only one property at a time. |
action | string or SelectableOption | Yes | - | ‘create’ adds a custom channel group; ‘update’ changes its name, description, rules or primary flag; ‘delete’ removes it. The Default Channel Group defined by Google cannot be changed or deleted. Options: ‘create’, ‘update’, ‘delete’. |
channel_group_id | string | No | - | Numeric id of the channel group to update or delete. Read ids from ga4_get_property_settings with setting ‘channel_groups’. |
display_name | string | No | - | Channel group name shown in reports (max 80 chars). Required on create. |
description | string | No | - | Optional description (max 256 chars). |
grouping_rule | array of object or string | No | - | Channels in evaluation order as the Admin API groupingRule array (object or JSON string), sent as-is and validated by Google; traffic that matches no rule falls into ‘Unassigned’. Each rule has displayName and an expression; Google requires the expression to be an andGroup whose children are orGroups, with the filters (or notExpression) inside the orGroup. A filter has fieldName, one of ‘eachScopeSource’, ‘eachScopeMedium’, ‘eachScopeCampaignName’, ‘eachScopeCampaignId’, ‘eachScopeSourcePlatform’ or ‘eachScopeDefaultChannelGroup’ (verified live; plain names such as ‘medium’ are rejected), with stringFilter {matchType EXACT, BEGINS_WITH, ENDS_WITH, CONTAINS, FULL_REGEXP or PARTIAL_REGEXP, value, caseSensitive} or inListFilter {values}. Example: [{“displayName”:“Brand Paid Search”,“expression”:{“andGroup”:{“filterExpressions”:[{“orGroup”:{“filterExpressions”:[{“filter”:{“fieldName”:“eachScopeMedium”,“stringFilter”:{“matchType”:“EXACT”,“value”:“cpc”}}}]}},{“orGroup”:{“filterExpressions”:[{“filter”:{“fieldName”:“eachScopeCampaignName”,“stringFilter”:{“matchType”:“CONTAINS”,“value”:“brand”}}}]}}]}}}]. Up to 50 rules. Required on create; on update the full list replaces the existing rules. |
primary | boolean | No | - | When true, this group becomes the default channel group used in reports. Only one group can be primary. |