-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hi everyone,
At Akamai, we utilize the User-Agent header for many reasons, ranging from making content delivery decisions to parsing it for reporting and analytics purposes.
As we are transitioning our code and infrastructure to utilize Client Hints instead, one challenge we're having is with interpreting the Sec-CH-UA and Sec-CH-UA-Full-Version-List headers. They contain a GREASEd list of many potential "brand names", without any indication of which one would be the "primary brand" (if having to choose just one).
For example, here are those two headers from my current Chrome:
Sec-CH-UA: "Google Chrome";v="113", "Chromium";v="113", "Not-A.Brand";v="24"
Sec-CH-UA-Full-Version-List: "Google Chrome";v="113.0.5672.63", "Chromium";v="113.0.5672.63", "Not-A.Brand";v="24.0.0.0"
These headers are of course GREASEd so there are multiple brands (and not-a-brands) listed:
Google Chromeis what I would consider the "primary" brand and is often used for site compatibilityChromiumcan be used for engine compatibilityNot-A.Brandis for GREASEing purposes
Our challenge for reporting and analytics, is to understand which of these is the "primary" brand. In other words, if the browser itself wanted to be identified as one particular thing (in reports, charts, for marketing purposes, etc), what would it be? In the above case, for Chrome, I would assume that would be Google Chrome.
There have been a few prior discussions about this topic:
- Usage share analytics + GREASE + white lies for compatibility
- Brand info is being used to block clients
- GREASE is not well thought and will be circumvented due to necessity
And the guidance here:
https://wicg.github.io/ua-client-hints/#marketshare-analytics-use-case
Which mentions:
This will necessitate regular updates to the list of known lists of brands when new browser versions are released or new browsers become popular, or else everything will get bucketed as an unknown browser… Such a list of known lists of brands could be maintained centrally…
Our primary use-cases for picking "one primary brand" are:
- Marketing analytics (in Akamai Control Center reports on visitors, for mPulse RUM on top browsers, etc)
- Reporting of errors or performance per brand (e.g. we should be able to identify problems/performance for Edge vs. Chrome vs. Vivaldi vs. Brave easily)
Given the headers' format today, we will likely need to maintain a list of "priority" (or "ignored") brands, and evaluate the headers against our list to determine which brand we want to report as the "most important" one. This list would need to be maintained and updated over time, with likely manual human intervention to review possible other "real" browsers that are new and should be reported on. We'd prefer to not have to maintain such a list :) And I assume there many other companies and products that will be facing this challenge as well.
Would there be a way, in the header, to indicate the "primary" brand for that UA? It would still send the others for site-compat (e.g. claiming to be "Google Chrome"), engine-compat ("Chromium") and GREASEing purposes ("Not;ABrand"), but couldn't one be indicated as "primary"?
An example for how the Chrome header would change to indicate ;primary:
Sec-CH-UA: "Google Chrome";v="113";primary, "Chromium";v="113", "Not-A.Brand";v="24"
And for other browsers, such as Edge:
// Edge today
Sec-CH-UA: "Not/A)Brand";v="99", "Microsoft Edge";v="115", "Chromium";v="115"
// Edge after
Sec-CH-UA: "Not/A)Brand";v="99", "Microsoft Edge";v="115";primary, "Chromium";v="115"
Vivaldi's current header is a result of WICG/ua-client-hints#293, and doesn't even report Vivaldi today. I think with a ;primary attribute Vivaldi might consider reporting something like this instead:
// Vivaldi today
Sec-CH-UA: "[Not.A/Brand](http://not.a/Brand)";v="8", "Chromium";v="114", "Google Chrome";v="114"
// Vivaldi after
Sec-CH-UA: "[Not.A/Brand](http://not.a/Brand)";v="8", "Chromium";v="114", "Google Chrome";v="114", "Vivaldi";v="114;primary"
WICG/ua-client-hints#115 concern about how new browsers identify themselves would also be addressed, because new browsers could indicate compatibility with Google Chrome and Chromium as well as marking their New Brand as ;primary for analytics purposes.
We've discussed this a bit with the Chrome team but would like to see if there are other companies that have a similar need.