Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Google Analytics determine “Device Category” (mobile/tablet/desktop)?

Currently, Google Analytics for web exposes a device category field, the discrete values for which are mobile, tablet, and desktop. The interface also allows you to dig deeper into the specific device it is. I imagine that Google has some kind of dictionary that maps these values to each other (device to device category, and/or vice versa), but I don’t know for sure.

Ultimately, I’d like to hook into this logic and utilize it. I’d like to run experiments based on the device category (i.e., mobile devices, in my case). There are lots of answers out there attempting to determine device category based on user agent and the like, but Google seems to have the most accurate eye into this. Thank you for your thoughts, in advance!

like image 704
Simon Ayzman Avatar asked Aug 02 '18 14:08

Simon Ayzman


People also ask

How does Google Analytics determine device category?

It is indeed from the User Agent Header which Google then analyzes to determine device, OS, and browser versions. Some things to point out: The processing is done on the server side (Google) so there is no way of directly modifying that data (even when sending data via the measurement protocol).

How does Google Analytics compare to mobile and desktop?

Mobile Device Usage in Google Analytics To see what percentage of your users are on mobile devices open up the Audience tab, and select Mobile and Overview. On the overview page, you should see all your normal Google Analytics data segmented between Desktops, Mobile and Tablets.

How does Google Analytics work on mobile apps?

To get the latest mobile app report features in Google Analytics, use Firebase in your Android and iOS apps. Once enabled in your app, Google Analytics will automatically collect and report on built-in events and user properties. You can also log custom events and set custom user properties.

Does Google Analytics work on mobile?

Analytics surfaces data about user behavior in your iOS and Android apps, enabling you to make better decisions about your product and marketing optimization. View crash data, notification effectiveness, deep-link performance, in-app purchase data, and more.


1 Answers

It is indeed from the User Agent Header which Google then analyzes to determine device, OS, and browser versions. Some things to point out:

  • The processing is done on the server side (Google) so there is no way of directly modifying that data (even when sending data via the measurement protocol).

  • The processing details are not disclosed by Google so you won't know what the outcome of your experiments are until they're reported by Google Analytics (which due to the 24-48 hour data processing latency might make such experimentation tedious).

  • Attempting to manipulate it might "break" your analytics: Google is vague about this, they just say: "Google has libraries to identify real user agents. Hand crafting your own agent could break at any time". 2 consequences I can think of: Google simply drops the traffic if it can't parse the User Agent OR marks it as bot/spider traffic (which will also be dropped if you have enabled the bot filtering option).

Although it's not mentioned in the documentation, I also suspect Google to rely on other data points, which could be:

  • Screen resolution
  • Java Support
  • Flash version

Although over time the last one should be less and less relevant as support for progressively disappears.

like image 154
Max Avatar answered Oct 03 '22 06:10

Max