I'm using the Measurement Protocol to push e-commerce events to GA4 and it works well. However, some time ago, I noticed that all transactions are marked as desktop (even those that were actually placed from a mobile device).
Is there a way to set device information (namely 'Device Category') when sending an event? In GA3 it was possible to achieve this via user-agent passing, but this does not seem to be relevant for the new analytics.
I tried experimenting with different GET parameters (like ua
) when sending an HTTP request, but it didn't work. Example:
https://www.google-analytics.com/mp/collect?measurement_id=GA_MEASUREMENT_ID&api_secret=GA_API_SECRET&ua=UserAgentString
The measurement protocol for GA4 is extremally limited. You cant set Device Category nor does it let you set user agent.
This is still in beta we just need to wait and see if they open it up more.