title: How does Google Analytics determine “Device Category” (mobile/tablet/desktop)?
body: <p>Currently, Google Analytics for web exposes a device category field, the discrete values for which are <strong>mobile</strong>, <strong>tablet</strong>, and <strong>desktop</strong>. 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.</p>
  
  <p>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., <strong>mobile</strong> 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!</p>