Skip to main content

51Degrees creates method to convert OpenRTB's Structured User Agent into User-Agent Client Hints

By: PR Leap
(PRLeap.com) As part of Google's User-Agent reduction, the User-Agent request header has been subject to a gradual deprecation in Chromium-based browsers since 2020, and the deprecation should be complete by May 2023.

User-Agent Client Hints (UA-CH) are a mechanism introduced by Google in 2020 to "enable developers to access information about a user's browser in a privacy-preserving and ergonomic way". Essentially, User-Agent Client Hints can be viewed as a replacement for a traditional User-Agent string in Chromium-based browsers.

Now that information within the User-Agent has been deprecated within Chromium browsers (which make up a large portion of the browser market share), IAB in April 2022 introduced a new Object: Device attribute in version 2.6 of the OpenRTB specification.

The Structured User Agent (sua or device.sua), referenced in sections 3.2.18 and 3.2.29 of the specification, is an OpenRTB attribute that can be used when the browser supports User-Agent Client Hints.

The value of the new oRTB request "device.sua" field is an object that contains User-Agent Client Hints information and the older "device.ua" field that contains a traditional User-Agent string. Both of these may be present in the OpenRTB bid request, however device.sua is likely to contain more complete and accurate information given that the User-Agent is reduced.

51Degrees already has support for User-Agent Client Hints, however we're providing a method of converting the OpenRTB Structured User Agent into User-Agent Client Hints.

Most device detection services (including 51Degrees) expect to receive evidence in the form of HTTP headers that contain a User-Agent and/or User-Agent Client Hints. Given the field correspondence table above, it is easy to come up with the routines to convert the information from the Structured User Agent format into the UA-CH header map format.

The conversion routines are hosted as part of this repository:https://github.com/51Degrees/sua-uach-conversion

We also have a demo page to test the Structured User Agent to UA-CH conversion: https://51degrees.github.io/sua-uach-conversion/

We encourage you to try the routines and use them in your code.

GET IN TOUCH
51Degrees
51degrees

https://51degrees.com/

You can see the original version and more on PRLeap here: http://www.prleap.com/pr/290268/51degrees-creates-method-to-convert-openrtbs-structured-user-agent-into-user-agent-client-hints

Data & News supplied by www.cloudquote.io
Stock quotes supplied by Barchart
Quotes delayed at least 20 minutes.
By accessing this page, you agree to the following
Privacy Policy and Terms and Conditions.