User Agent generalization

If a publisher or a user requires increased privacy protections, Google might reduce the amount of information provided in the user agent fields. When the information is reduced, these user agent representations are considered generalized.

Generalized user agent representations provide increased privacy protections by limiting information that might distinguish a given browser or a device from other browsers or devices.

Overview

The bid request contains two representations of User Agent information: the User-Agent string and the UserAgent object (Google protocol, OpenRTB). Both fields contain information provided by the request's user agent HTTP headers.

Non-generalized user agents can contain granular browser and operating system versions and other detailed data that is reduced in the generalized form of the user agent.

Generalization is backwards-compatible for browser and device type detection. Bid requests indicate if the User Agent fields have been generalized in PrivacyTreatments fields (Google protocol, OpenRTB).

Generalized UserAgent object

In the generalized UserAgent, the version fields from all browser entries and from the platform are reduced to only contain the major version by replacing any finer-grained version components with zeros. No other information in the UserAgent object is removed.

The following example compares the original contents of UserAgent.browser to its generalized form:

Original brand: "Chrome" version: ["96", "0", "4664", "92"]

Generalized brand: "Chrome" version: ["96", "0", "0", "0"]

Google doesn't always generalize browser and platform versions, in particular when the full version is frozen by the browser. For example, the following value of UserAgent.browser will not be modified: brand: "AppleWebKit" version: ["537", "36"].

When the UserAgent object is generalized, the bid request also contains the user_agent_data field in the PrivacyTreatments object:

Google protocol BidRequest.privacy_treatments: { user_agent_data: USER_AGENT_DATA_COARSENED }

OpenRTB protocol BidRequest.ext.privacy_treatments: { user_agent_data: USER_AGENT_DATA_COARSENED }

Generalized User-Agent string

In the generalized User-Agent string, browser and platform identifiers are reduced to major versions only. For example, "Chrome/96.0.4664.92" becomes "​​Chrome/96.0.0.0". Frozen version components, such as "AppleWebKit/537.36", are preserved. These changes are equivalent to what we described for the UserAgent object.

Unique to the user-Agent string, some details or non-standard elements might also be redacted, for example the device's Build or firmware version, or certain app-specific data that's often added at the end of the string.

The following example compares the original contents of the User-Agent string to its generalized form:

Original Mozilla/5.0 (Linux; Android 11; M2007J20CG Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/96.0.4664.92 Mobile Safari/537.36 [MyApp:CustomSignals:ABC123]

Generalized Mozilla/5.0 (Linux; Android 11; M2007J20CG; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/96.0.0.0 Mobile Safari/537.36

When the User-Agent string is generalized, the bid request contains the user_agent signal in the PrivacyTreatments object:

Google protocol BidRequest.privacy_treatments: { user_agent: USER_AGENT_COARSENED }

OpenRTB protocol BidRequest.ext.privacy_treatments: { user_agent: USER_AGENT_COARSENED }

Google uses similar approaches to generalizing the User-Agent string and the UserAgent object. As a result, the generalized User-Agent string and the generalized UserAgent object carry a similar amount of information.