5

The Event Log API CSV exposes a USER_AGENT column. The API documentation for this column states:

USER_AGENT
Type: Number
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?

enter image description here

Some example values used against the REST API are 9999 and 13047000.

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.

3

Via Adam Torman - Browser and User Agent Values

User agent versions are calculated dynamically:

  1. The first two digits are reserved for browser family/name.
  2. The next three digits are for major version numbers, such as "008" for version 8.
  3. 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

Examples:

Value    - Label output
10007000 - IE 7
10008000 - IE 8
11015000 - FF 15
12024000 - Chrome 24
12024001 - Mobile Chrome 24

So 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.