how can I parse and group/do stats on user agent strings?

Posted by user151841 on Stack Overflow See other posts from Stack Overflow or by user151841
Published on 2010-04-21T14:30:52Z Indexed on 2010/04/21 14:33 UTC
Read the original article Hit count: 312

Filed under:
|

I have a database that has the various user-agent strings of visitors to our site. I'd like to do a 'survey' of them to see what browsers our users are using, so that I can know what features I can use in future development.

Is there a tool to parse and run statistics on user-agent strings, or a bunch of strings like this?

Ideally, I'd like to see a hierarchical grouping of the stats. For instance:

Opera/9.80 (Windows Mobile; WCE; Opera Mobi/WMD-50301; U; en) Presto/2.4.13 Version/10.00
Opera/9.80 (J2ME/MIDP; Opera Mini/4.2.14912/1280; U; en) Presto/2.2.0
Opera/9.80 (J2ME/MIDP; Opera Mini/4.2.13918/812; U; en) Presto/2.2.0
Opera/9.64 (Macintosh; Intel Mac OS X; U; en) Presto/2.1.1
Opera/9.60 (J2ME/MIDP; Opera Mini/4.2.13918/786; U; en) Presto/2.2.0
Opera/9.60 (J2ME/MIDP; Opera Mini/4.0.10992/432; U; en) Presto/2.2.0

I'd like to see 6 entries for Opera, broken down into 3 for 9.80, 1 for 9.64 and 2 for 9.60, and so forth for all browsers.

Other dimensions, such as OS, would cross the boundaries of the browser version hierarchy, but it might be nice to see also.

© Stack Overflow or respective owner

Related posts about user-agent

Related posts about string-parsing