My self-generated logfiles show the following UserAgent entry for an Opera browser :
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 4.0 [en]
but AWStats detects it as a msie version (since this is checked first). So, if you want to detect it, I think you have to include it even before the msie check. I don't know if it's the same for a deamon-generated logfile, so maybe someone has to check this ...
It seems that Opera lets you choose how it will identify itself (as msie, mozilla, ...). If you say it to identify it as msie, AWStats will not detect it.
You can however still detect Opera, if you include a !($UserAgent ~= /opera/) in the msie and mozilla options ...
(or include it before those two checks, as I've mentioned earlier).
I had the same problem with OmniWeb and with iCab. I wouldn't mind too much if they were counted as miscellaneous browsers, but I wasn't comfortable having them show up as MSIE or Netscape.
So I looked into the same kinds of workarounds that you did, and submitted a patch which went into 2.24 to recognize those two browsers.
Ultimately, though, I think there are better ideas than to keep adding more patches for Opera and others as we notice them individually. For one thing, we need to know to test each new browser, or it'll just quietly get miscounted and we'll never be the wiser.
So I submitted a second patch (against 2.23) which rethinks the whole process of user agent mapping. It speeds up the processing by caching recognized user agents. It also adds the specific user agents to the details page, so that we can detect if a given browser (or OS) is being misinterpreted.
This patch is still being reviewed, as far as I know. It affects many sections of the code, and changes several sections of the history file. So I'm not sure when (or if!) it'll become part of the official awstats. But I hope it does.
BTW: offhand, I don't think my patch will handle Opera, since the word Opera appears outside the "(compatible; ...)" section. This is easily fixed, though, not to mention easily detected and debugged with the patch. If there's interest, I can fix this and synch up with the latest 2.24 and resubmit.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.