counter.dev icon indicating copy to clipboard operation
counter.dev copied to clipboard

Identifies Microsoft Edge (Chromium) as IE

Open hello-smile6 opened this issue 2 years ago • 3 comments

image

hello-smile6 avatar Feb 26 '22 22:02 hello-smile6

Related issue: https://github.com/avct/uasurfer/pull/69

Related to this is that android gets seen as Linux (I guess it technically is, but for analytics it would be better to separate the two I think).

Might be time to switch to a different user agent parser? This fork is being updated: https://github.com/xavivars/uasurfer, https://github.com/mileusna/useragent also seems quite nice.

CamilleScholtz avatar Apr 20 '22 19:04 CamilleScholtz

It seems MacOS is also not detected. https://github.com/ihucos/counter.dev/issues/56 is most likely related as well.

CamilleScholtz avatar Apr 21 '22 08:04 CamilleScholtz

It seems MacOS is also not detected. #56 is most likely related as well.

My library can detect MacOS... https://tildegit.org/9pfs/neofetch-js

hello-smile6 avatar Apr 21 '22 15:04 hello-smile6

Sounds reasonable. Will close until it resurfaces though.

ihucos avatar Aug 25 '22 18:08 ihucos

I still see Microsoft Edge being detected as IE.

stevennyman avatar Sep 16 '22 21:09 stevennyman

Will fix :-)

ihucos avatar Sep 17 '22 11:09 ihucos

I changed the lib to the more maintained fork (https://github.com/ihucos/counter.dev/commit/bc58e34a19337824845ab5c11e61b7c82a76f4c5 ): https://github.com/xavivars/uasurfer

Edge is being recognized as Edge now. Android is still shown as linux though :-/

ihucos avatar Sep 17 '22 12:09 ihucos

Identified lasting issue, fixing :-)

ihucos avatar Sep 17 '22 12:09 ihucos

Identified lasting issue, fixing :-)

Regarding "Android" being showed as "Linux":

That pie chart is being called "Platforms", which by uasurfers defintion is:

const (
	PlatformUnknown Platform = iota
	PlatformWindows
	PlatformMac
	PlatformLinux
	PlatformiPad
	PlatformiPhone
	PlatformiPod
	PlatformBlackberry
	PlatformWindowsPhone
	PlatformPlaystation
	PlatformXbox
	PlatformNintendo
	PlatformBot
)

Note, how there is not "Android". Then there is also "OS", which is currently not being tracked. It's one of.

const (
	OSUnknown OSName = iota
	OSWindowsPhone
	OSWindows
	OSMacOSX
	OSiOS
	OSAndroid
	OSBlackberry
	OSChromeOS
	OSKindle
	OSWebOS
	OSLinux
	OSPlaystation
	OSXbox
	OSNintendo
	OSBot
)

~~There's "iOS" and "iPad" there which seems handy.~~

There are basically two ways to fix that.

  1. Start tracking uasurfers OSes. Show a pie chart named "OS" rather then "Platform" only when this new data is available (Will never for older intregrations when vieweing all data in the dashboard)

  2. Hack the "Android" into it. Making historic data slight inacurate as, as "Linux" will represent older "Android" counts.

Maybe there are also other solutions?

ihucos avatar Sep 17 '22 13:09 ihucos

I went with solution 1.

Screenshot 2022-09-17 at 16 33 01

Thanks for the feedback. I'll close the issue. Let me know if it works as expected.

ihucos avatar Sep 17 '22 14:09 ihucos

Edge is now tracked correctly, thank you for fixing this so quickly!

stevennyman avatar Sep 17 '22 19:09 stevennyman

+1

ihucos avatar Sep 17 '22 21:09 ihucos