react-ga4
react-ga4 copied to clipboard
ga4: make "set [string] [object]" requests work
gtag set command can have two sets of params:
gtag('set', <object>)
gtag('set', <string>, <object>)
the latter doesn't work because of some checks in set() method requiring the first parameter to be always an object. This breaks some user-scoped custom dimensions like this one:
gtag('set', 'user_properties', {
favorite_composer: 'Mahler',
favorite_instrument: 'double bass',
season_ticketholder: 'true'
});
This should fix https://github.com/codler/react-ga4/issues/34
rif. https://support.google.com/analytics/answer/12370404
When are we planning to merge this ? @codler @AceGentile
This should be definitely merged
Any workaround? Been a while and branch has not been merged.
@codler why make a package you don't intend to maintain ? People spend their time to write code and submit PRs too.