You may wonder what type of browsers your visitors have. The best way to collect this information is using an analytics service such as Google Analytics.
What if you don’t use any analytics service but still want to collect browser stats? Your only option is that digging into web server logs. However, it’s not easy because web server logs provide user-agent data. It doesn’t provide direct browser information.
Here is how IIS logs look like:
How to Get Browser Info from IIS Data?
Follow these steps to convert raw IIS log to meaningful browser stats:
- Copy IIS logs to a folder (IIS logs are typically in C:\inetpub\logs\LogFiles)
- Install and run Log Parser Studio
- Click “Log” icon. Select the folder of your log files
- In “Library” tab, double click “IIS: User-Agent Report“
- Click “Execute” icon (red exclamation mark). Now you have user-agent stats
- In order to map user-agent information to specific browser version, you can use one of these free parser tools: One, two, three
- Finally, use an Office product like Excel or an online service such as Canva to visualize your data
You will need to parse user-agent strings one by one.
Is there a way to parse all them at once?
Yes! Some of these parser tools provide API. You can develop a small application to query this API and parse a batch of user-agent strings at once.