User-agent request header
Last Updated:(Undefined variable: WP_LastUpdate.WP5-Update)
In order to better track and analyze the activity generated by Web App and Mobile App users, a new way to differentiate API requests and logs from both platforms is now used: the User-Agent request header.
How does it work?
The User-Agent request header is a string HTTP header that allows servers and network peers to identify the application details (browser version, operating system, etc.). When a user connects to one of the beqom applications, the header sends its logging information and stores them in the k_stats_user_session table using the GetUserParameters method.
This is particularly useful to store requests and information logs from the different platforms and the different users for analysis purposes.
Header syntax and data storage
The User-Agent header syntax is the following:
- Web App: Mozilla/ <version> (<system and browser information>) <platform> (<platform details>) <extensions>
- Mobile App: <AppName>/<version> (<system information>) <platform> (<platform details>) <extensions>
The UAParser package is used to interpret all the users information which are stored in the following columns of the k_stats_user_session table in the database:
- [os]: stores the operating system
- [os_version]: stores the version of the operating system
- [device_brand]: stores the brand of the device used
- [device_model]: stores the model of the device used
- [browser] : stores the browser that is used
- [browser_version]: stores the version of the browser that is used