If you use the addAlgoliaAgent method to append a custom string to the user agent for events, you may notice that the Events Debugger displays "Unknown Device" in the Device column and "Unknown user agent" for the User Agent.
Because most browsers and mobile clients can send any value in a request's user agent field regardless of our API client's configuration, Algolia also uses a custom field X-Algolia-Agent to ensure consistency.
The Device column in the Events Debugger table isn’t designed to show the text content that the end-user sends in their user-agent. Instead, it only shows one of a small number of strings (‘Mobile’, ‘Tablet’, ‘Desktop’ or ‘Unknown Device’) based on what we understand the client to be.
This very basic interpretation is based on a combination of what is present in the real User-Agent field and our custom X-Algolia-Agent field. The parsing of these fields is rudimentary and providing custom values for X-Algolia-Agent will reliably result in ‘unknown’.
The addAlgoliaAgent method does not update the User-Agent but rather the custom X-Algolia-Agent field which we use to maintain compatibility with clients that restrict modification of the actual User-Agent field.
