Learn business growth with Google Analytics 4 › Forums › Google Analytics 4 › Google Analytics GA4 Content Groups › Reply To: Google Analytics GA4 Content Groups
-
Yeah, the doc is wrong when it comes to GA4. You can’t use ‘set’ to drop in ‘content_group’ with GA4 like you can with UA. Instead, ‘content_group’ needs to be set with ‘config’ call, like this:
`
gtag(‘config’, ‘G-nnnnn’, {‘content_group’: ‘ZZZ’});
`
Or you can do it with individual events:
`
gtag(‘event’, ‘event_name’, {
‘content_group’: ‘ZZZ’,
// other event data
});
`
Or even mix ‘n match to override the page-wide content group just for one event.
Don’t forget that unlike UA where you could have ‘content_group1’, ‘content_group2’, …, etc. GA4 only lets you use one content group.