'How to send User Properties to Measurement Protocol (Google Analytics 4)?

With the Measurement Protocol for Google Analytics 4 we can send custom events (source). With the gtag.js Google Analytics, however, there are several predefined user dimensions that GA automatically tracks.

That documentation page mentions:

As long as you use the SDK or gtag.js, you don't need to write additional code to collect the following user dimensions from your mobile app and/or website.

However, how do we collect those user dimensions (like language, browser, country) with the Measurement Protocol? This is unfortunately not documented in the Protocol reference. (And neither could I find information on this elsewhere.)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source