-
How to override platform tracking in GA4 manually?
Hey there!
At the moment, we’re in the process of updating our Hybrid Web app to Google Analytics 4 and we’re trying to track the platform using gtag, but we’ve hit a bit of a snag. It appears that regardless of the platform, the app seems to only track it as the ‘web’ platform. Does anyone know if we can tweak this somehow?
I’ve been digging around a bit and came across https://ga-dev-tools.google/ga4/dimensions-metrics-explorer/ which indicates that the dimension we should be focusing on is ‘platform’. But whether we’re tracking an event with that parameter or setting it directly, neither seem to do the trick. Here’s what I tried:
`javascript
gtag(‘set’, { platform: ‘Android’ });
gtag(‘event’, ‘page_view’, { platform: ‘Android’ });
`
While it’s true that these get sent as event parameters and can be viewed in individual events, the tracked platform still remains as ‘web’. Can anyone help out with this?
Log in to reply.