The Event Log API CSV exposes a USER_AGENT column. The API documentation for this column states:
Description: The numeric code for the type of client used to make the request (for example, the browser, application, or API).
How can I decode what this numeric value represents?
Some example values used against the REST API are
Ideally I’d like to be able to work back to, for example, the User agent that a browser sent with the request.
My ultimate goal is to send in custom user agent strings and then identify them in the resulting numeric codes.
User agent versions are calculated dynamically:
- The first two digits are reserved for browser family/name.
- The next three digits are for major version numbers, such as “008” for version 8.
The last three digits are flags for describing browser variants.
a. The first two digits can be used as desired internally and may differ from browser to browser. Commonly these would be used for minor versions or for things like compatibility view mode flags.
b. The last digit indicates device type.
0 = desktop/laptop 1 = mobile (generic/any/unknown) 2 = phone 3 = tablet 4 = media player 5 = reserved 6-9 = vary by UserAgent
Value - Label output 10007000 - IE 7 10008000 - IE 8 11015000 - FF 15 12024000 - Chrome 24 12024001 - Mobile Chrome 24
13047000 from the example in the question is Chrome 47 Desktop/Laptop
9999 is most likely an “unknown” user agent string. There is talk of a pilot program to support unknown user agent strings.