Skip to content
This repository has been archived by the owner on Jul 19, 2018. It is now read-only.

identify webviews #451

Closed
stevesouders opened this issue Oct 4, 2014 · 7 comments
Closed

identify webviews #451

stevesouders opened this issue Oct 4, 2014 · 7 comments

Comments

@stevesouders
Copy link

Hi. I'm doing a deep dive on the performance of webviews. I'd love to get RUM metrics broken out by native mobile browser vs mobile webview, but it looks like ua-parser doesn't disambiguate these. For example, here's the UA for Facebook's iOS webview:

Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D201 [FBAN/FBIOS;FBAV/12.1.0.24.20;FBBV/3214247;FBDV/iPhone6,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/7.1.1;FBSS/2; FBCR/AT&T;FBID/phone;FBLC/en_US;FBOP/5]

Ua-parser labels it "Mobile Safari" without mentioning webview. At a minimum I'd like to see "Mobile Safari webview" and potentially "Mobile Safari webview Facebook".

What do people think of this idea? Should I just start contributing regexes?

@elsigh
Copy link
Contributor

elsigh commented Oct 5, 2014

Do you know if FB (or anyone) can make a functional change to the webview? Though, I suppose that's actually what you're trying to check for, yeah?

If not I wonder if this is really a different UA, or more like OS - ie. some sort of container/annotation for a particular UA. In that case, I wonder if it might be better to either add an annotation to the OS object or device object in this case.

I agree that it would be good to be able to detect the webview case, and also to be able to mark popular webview strings somehow (twitter, fb, etc...)

@stevesouders
Copy link
Author

Webviews are (notoriously) worse than their native browser counterpart. For example, in iOS 7 you get "mobile safari" for both a webview and mobile safari UA, but the webview does not have Nitro, IndexedDb, etc. So I'd like to separate that out in my metrics. It's also interesting to know how many people are visiting my website from a webview (Chrome for iOS, Facebook, Twitter) vs the mobile browser.

So it's not about whether FB can change the webview. Instead, it's about distinguishing webview from mobile browser traffic, and potentially slicing the webview traffic further to see the sources (FB, Chrome for iOS, Twitter, etc.).

Does that help pinpoint where to add the info?

@elsigh
Copy link
Contributor

elsigh commented Oct 6, 2014

Yep - I totally agree that the string "webview" ought to be a part of the ua.family (i.e. Safari (webview)) to disambiguate it from normal Safari (assuming we can detect that difference from the UA string).

It's the latter part about the further-modified-by-distributor string (FB, Twitter) and I'm not sure where we should put that.

So I'm cool with family becoming Safari (Webview) and Chrome (Webview) - I think submitting a regex change PR is the way to go for this.

Looks like someone put up a cool site to show what ua-parser currently determines the UA to be:
http://www.whatsmyua.info/

@tobie
Copy link
Owner

tobie commented Nov 8, 2014

Sounds good.

@broggeri
Copy link

broggeri commented Dec 5, 2014

Hello, is someone working on this ? I might try to take a stab at it.

@tobie
Copy link
Owner

tobie commented Dec 5, 2014

Not that I know of. See related thread on the mailing list: https://groups.google.com/d/msg/ua-parser/clM4un5jgY4/b9alPXlZ6zYJ

@Ironholds
Copy link
Collaborator

Also note that ua-parser is deprecated as a place to throw new changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants