User-Agent-for-Device-Detection-Hero-Image

User-Agents and Device Detection

Benjamin CB

6/27/2019 3:00 PM

Device Detection Apple Analysis Device Data

What are User-Agents and how are they used in the device detection process?

Every time you visit a website, your device transmits a User-Agent to that website. A User-Agent is a string of characters which contains information about your device. 51Degrees translates this string into a multitude of attributes specifically related to your device.

Here is an example User-Agent:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Try me for yourself

The main components you can identify with a User-Agent are:

  • Physical Device - The model of the device including chips, price, age, screen dimensions and supported mobile network technologies.
  • Operating System - Whether it's running on Android, iOS, Windows, or another OS, including the version.
  • Browser - Whether it's Chrome or Firefox, or another browser.

Update: We dissect the User Agent string in more detail in our guide to Understanding User-Agent strings. Check it out for more information on the different components and history of the string.

How Can Businesses Use User-Agents:

Device detection solutions such as 51Degrees use User-Agents to identify important device properties such as vendor, OS and browser combinations accessing your site. From here, you can tailor the content you return to offer the best experience and performance possible. As we all know, improved UX leads to better conversion rates and customer satisfaction.

Device Detection Using User-Agents:

Device detection solutions use User-Agents in the following way:

  • When a user accesses your site, the website or CMS receives the request.
  • 51Degrees uses signatures (important substrings that match a User-Agent to a specific profile) from over 3,002,817 combinations of device models, browser and operating system to determine the type of device in less than 1 millisecond.
  • Your website returns a page optimized for the precise screen and device type, ensuring maximum performance and the best user experience every time.
  • Other revenue enhancing customizations can be applied based on other factors such as whether the device supports telephone calls, SMS or has a built-in physical qwerty pad.

Device Data and Privacy

User-Agents do not include personally identifiable information and have no bearing on the General Data Protection Regulation (GDPR). All data that can be gathered from a User-Agent is soley based on properties of the device model. It does not provide any information about the user. Data on device properties helps businesses in the AdTech, E-Commerce, Publishers, CMS and other sectors deliver their web content to the user's device in the most optimized form.

Apple User-Agents

Many User-Agents from Apple iOS devices don't include sufficient information to identify the precise model of device. 51Degrees User-Agent techniques are enhanced for Apple devices through the use of JavaScript queries.

You can read all about detecting Apple User-Agents.

The important User-Agent segments for device detection are highlighted below:

Smartphone and Tablet User Agents:

Hardware

Software

Browser

1. Apple iPhone XS User Agent:

Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBDV/iPhone11,2;FBMD/iPhone;FBSN/iOS;FBSV/12.2;FBSS/3;FBCR/AT&T;FBID/phone;FBLC/en_US;FBOP/5]

2. Apple iPhone XS Max

Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBDV/iPhone11,6;FBMD/iPhone;FBSN/iOS;FBSV/12.2;FBSS/3;FBCR/AT&T;FBID/phone;FBLC/en_US;FBOP/5]

3. Apple iPhone XR

Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBDV/iPhone11,8;FBMD/iPhone;FBSN/iOS;FBSV/12.2;FBSS/2;FBCR/AT&T;FBID/phone;FBLC/en_US;FBOP/5]

4. BlackBerry Key2 LE

Mozilla/5.0 (Linux; Android 8.1.0; BBE100-2 Build/OPM1.171019.026) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36

5. Motorola One Power

Dalvik/2.1.0 (Linux; U; Android 8.1.0; motorola one power Build/OPT28.81-39)

6. Samsung Galaxy Note9

Mozilla/5.0 (Linux; Android 8.1.0; SAMSUNG SM-N960F Build/M1AJQ) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/8.0 Chrome/63.0.3239.111 Mobile Safari/537.36

Mozilla/5.0 (Linux; Android 8.1.0; SM-N960U1 Build/M1AJQ; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.91 Mobile Safari/537.36

Mozilla/5.0 (Linux; Android 8.1.0; SM-N960N Build/M1AJQ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Mobile Safari/537.36

Mozilla/5.0 (Linux; Android 8.1.0; SM-N960W Build/M1AJQ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.91 Mobile Safari/537.36

Dalvik/2.1.0 (Linux; U; Android 8.1.0; SM-N960U Build/M1AJB)

7. Samsung Galaxy Tab S4

Mozilla/5.0 (Linux; Android 8.1.0; SM-T830 Build/M1AJQ; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.91 Safari/537.36

8. HMD Global Nokia 5.1

Mozilla/5.0 (Linux; Android 8.0.0; Nokia 5.1 Build/O00623) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.91 Mobile Safari/537.36

9. HMD Global Nokia 6.1 Plus

Mozilla/5.0 (Linux; Android 8.1.0; Nokia 6.1 Plus Build/OPR1.170623.026) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.91 Mobile Safari/537.36

10. Xiaomi POCO F1

Mozilla/5.0 (Linux; Android 8.1.0; POCO F1 Build/OPM1.171019.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Mobile Safari/537.36

Of course, this is just a glimpse into the device detection process. More information about User-Agents can be found in our previous User-Agent Analysis blog.