PDA

View Full Version : Browser stats and Opera


Tomcat76
01-25-2004, 03:12 PM
Hello. I've read the introduction to the StatCounter but still have one question:

Is Opera detected properly in all cases, or is it logged as MSIE or Netscape depending on how it's identifying itself as?

Blueberry
01-27-2004, 06:17 PM
If Opera has faked a header I don't see where else you could extract information about its "true" identity. So it's quite definitely identified as MSIE/Netscape if the preferences are set like that.

Tomcat76
01-28-2004, 03:19 AM
Opera isn't "spoofing" like some other browsers (i.e. KHTML's) can do; no matter what, you can always see it's Opera.

I'm using Opera 7.50 preview 1.& Here's the navigator.userAgent info.

Identified as Opera:
Opera/7.50 (Windows NT 5.0; U) [en]

Identified as MSIE:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.50 [en]

Identified as Mozilla:
Mozilla/5.0 (Windows NT 5.0; U) Opera 7.50 [en]


And Opera 7.23...

As Opera:
Opera/7.23 (Windows NT 5.0; U) [en]

As MSIE:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.23 [en]

As Mozilla:
Mozilla/5.0 (Windows NT 5.0; U) Opera 7.23 [en]


<script type="text/javascript">
nua=navigator.userAgent;
pfnav=parseFloat(navigator.appVersion);
if (nua.indexOf("Opera/")!=-1) { document.write("Opera "+pfnav) }
else if (nua.indexOf("Opera")!=-1) {
temp=nua.split("Opera");pfnuaOP=parseFloat(temp[1]);
document.write("Opera "+pfnuaOP)
}
</script>


The first identifies Opera when identified as Opera, while the second covers it when identified as something else.& BTW: the technique used in the second part is the same as the one to determine the version of "the real" Internet Explorer.


In any case, Opera isn't doing this to make our lives miserable.& If they did, they'd spoof the userAgent string completely.& The reason why those small changes are done is to be able to view old sites that sniff out and differentiate between Internet Explorer and Netscape only.& The Internet Explorer version seems to be favored because the content fed to Netscape is usually catered to Netscape 4, but you can switch to "Identify as Mozilla" if the content fed to Internet Explorer is an ActiveX control (or something else that only IE is allowed to handle).& But, this is mere an accessibility thing because, whatever Opera is being identified as, the rendering engine is still the same; it doesn't simulate Internet Explorer nor Mozilla by that in any way.


Look... I just wanted to know if the script used by StatCounter is properly identifying Opera in all cases.& If it is, I'll gladly wait till February 6 to apply for an account.

svedman
02-23-2004, 10:25 AM
No, StatCounter does not detect Opera properly.

Although one can say that this is Opera's problem, it is very easy to detect Opera. And as a happy user of the StatCounter, I'd like to detect it.

The absolutely easiest way to detect Opera regardless of its UA string is by using this JavaScript:


if (window.opera) {
[Do stuff here]
}


The above will return TRUE if the visitor is using Opera and FALSE if the visitor is using any other browser.

The script will detect any versions of Opera from 5.12 and up, it will probably detect version 4.x too, but it will not detect version 3.62 and below. However, I doubt anybody is still using that version, and it's better than nothing!

Hope this helps, and that the good fellows at StatCounter will implement this. ;)

02-23-2004, 11:39 AM
Interesting ... we'll look into using javascript to detect more accurately than the mere useragent string. Thanks for the info. It's yet another way in which StatCounter can be better than log analysis.

Thanks for the help guys!

Per Hansson
09-24-2004, 11:26 PM
Has this been implemented?

awstats has some very good browser recognition code, perhaps have a look at that?

svedman
09-25-2004, 01:29 AM
Yes, it would seem to be implemented now.

Actually, 2/3s of my visitors use Opera :D - And I am blocking my own visits :wink:

http://my.statcounter.com/project/standard/browser.php?project_id=242181&guest=1

Per Hansson
09-25-2004, 10:13 AM
Tack så mycket svedman, ja statcounter identifierar Opera korrekt nu.

Hoppas du tycker det var okej att jag lekte lite med mina inställningar för att se det på din stat sida, min host är: 1Cust66.tnt4.stk3.swe.da.uu.net

svedman
09-25-2004, 01:05 PM
No problem, Per. :)

graham35
09-25-2004, 10:56 PM
I use Opera 7.54 and it always shows up in my stats, also so I often see other version of opera in my stats

Goods stuff these statcounters - by statcounter

trackerm
09-27-2004, 03:30 AM
Actually, 2/3s of my visitors use Opera

I get 1 in 100 using Opera. Strange that browser use can be so different in other parts of the world.

Mozilla/Firefox is picking up.


68 MSIE 6.0
5 Mozilla 5.0
4 MSIE 5.5
3 Netscape 7.1
2 MSIE 5.0
2 MSIE 5.23
2 Firefox 0.9.3
2 Mozilla 3.01
1 MSIE 5.01
1 Netscape 7.2
1 Konqueror 3.2
1 MSIE 5.17
1 Firefox 0.8
1 Mozilla 4.5
1 Firefox 1.0
1 Opera 7.23
1 Safari 1.2
1 MSIE 5.22
1 Netscape 7.02
1 Safari 1.0
[/quote]