Closed
Bug 862868
Opened 12 years ago
Closed 12 years ago
Firefox OS is not being detected in Google Analytics
Categories
(Websites :: Web Analytics, task)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: cmore, Unassigned)
Details
Per these docs:
http://lawrencemandel.com/2012/07/27/decision-made-firefox-os-user-agent-string/
https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference#Firefox_OS
The Firefox OS user agent is in this pattern:
Mozilla/5.0 (Mobile; rv:15.0) Gecko/15.0 Firefox/15.0
We *think* we can see Firefox OS traffic in GA by using the following criteria
* Browser: Firefox
* OS: (not set)
Google Analytics appears to benot categorizing Firefox OS traffic as mobile nor understanding the device it is on because the operating system field is blank. It may be possible for Google Analytics to be able to manually set the OS field to "Firefox OS" if the user agent matches the UA pattern or at a minimum set Mobile = Yes.
We've opened a support request with Google Analytics premium.
Reporter | ||
Comment 1•12 years ago
|
||
"Firefox OS does not include any operating system identifier in its user agent string. Gervase Markham provided a detailed explanation for this decision. It follows from this explanation that Firefox OS should not expose itself to Web clients in any manner. Therefore, navigator.platform will return an empty string when called on Firefox OS."
It doesn't appear that we will be able to know about type of phones visitors are coming from and won't probably be able to say with 100% certainty this is Firefox OS. We should be able to set Mobile = Yes at a minimum. More info on the blank platform in bug 801614.
Reporter | ||
Comment 2•12 years ago
|
||
Per bug 777710, not being able to directly detect Firefox OS is expected behavior. It still may be possible to detect Firefox OS by saying browser = Firefox, Mobile = Yes, and OS = (not set), but it is not ideal or 100% definitive.
Comment 3•12 years ago
|
||
I've touched base with our GA folks and asked if there is a formal method for them to recognize this. There's a tech ticket as of yesterday.
The problem with the description proposal is that we don't know what other builds use this string.
Reporter | ||
Comment 4•12 years ago
|
||
(In reply to Annie Elliott from comment #3)
> I've touched base with our GA folks and asked if there is a formal method
> for them to recognize this. There's a tech ticket as of yesterday.
>
> The problem with the description proposal is that we don't know what other
> builds use this string.
I've already opened up a support ticket with GA yesterday and they are looking into it too. We should have one support ticket for this or let them know this is the same request.
Comment 5•12 years ago
|
||
Touch base with Anne Wang (who I went to). Great minds think alike?!
Comment 6•12 years ago
|
||
Also, what is the rationale for leaving the
OS blank?
Reporter | ||
Comment 7•12 years ago
|
||
(In reply to Annie Elliott from comment #6)
> Also, what is the rationale for leaving the
> OS blank?
See comment 0, comment 1 and comment 2 links and bugs for the info why it was left blank.
Reporter | ||
Comment 8•12 years ago
|
||
Outside of the UA string you can also check to see if navigator.mozApps is present then it is *not* Android and more likely Firefox OS. (From Matt Basta)
Reporter | ||
Comment 9•12 years ago
|
||
I talked to Google Again and the reason that Firefox OS is being detected as "desktop" is because the OS/platform is blank. The said the only way to change it to mobile is to put logic on GA's side like if {Browser = "Firefox" and OS = (not set)} then set OS = "Firefox OS" Mobile = "Yes", but that seems kind of hacky and prone to not being exactly precise. I have told GA to not proceed with anything until we make a decision.
Comment 10•12 years ago
|
||
(In reply to Chris More [:cmore] from comment #8)
> Outside of the UA string you can also check to see if navigator.mozApps is
> present then it is *not* Android and more likely Firefox OS. (From Matt
> Basta)
That's not true, we have mozApps support on Android also.
Reporter | ||
Comment 11•12 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #10)
> (In reply to Chris More [:cmore] from comment #8)
> > Outside of the UA string you can also check to see if navigator.mozApps is
> > present then it is *not* Android and more likely Firefox OS. (From Matt
> > Basta)
>
> That's not true, we have mozApps support on Android also.
I specifically said if navigator.mozApps is present *and* OS != Android, then OS = Firefox OS as the logic.
Comment 12•12 years ago
|
||
(In reply to Chris More [:cmore] from comment #11)
> (In reply to Fabrice Desré [:fabrice] from comment #10)
> > (In reply to Chris More [:cmore] from comment #8)
> > > Outside of the UA string you can also check to see if navigator.mozApps is
> > > present then it is *not* Android and more likely Firefox OS. (From Matt
> > > Basta)
> >
> > That's not true, we have mozApps support on Android also.
>
> I specifically said if navigator.mozApps is present *and* OS != Android,
> then OS = Firefox OS as the logic.
Still not true, since we also support mozApps on the desktop. Or I'm really missing something...
Reporter | ||
Comment 13•12 years ago
|
||
> Still not true, since we also support mozApps on the desktop. Or I'm really
> missing something...
Ok, how about Browser = Firefox and navigator.mozApps = true and OS = (blank)? You could say OS != (Android|Windows|OSX|Linux), but a blank OS should not match any of the OS's that we have on the desktop side. You could also look for Mobile = Yes to be even more certain, but this bug is specifically about Google Analytics, and I don't know if they can do logic based on navigator.whatever. in GA, Mobile is desktop, because they start at the OS level first and if it is blank, they stop guessing immediately.
I will check with GA if they can do feature-based detection.
Comment 14•12 years ago
|
||
> in GA, Mobile is desktop, because they start at the OS level first and if it is blank, they stop guessing immediately.
Isn't it GA's defect?
Reporter | ||
Comment 15•12 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #14)
> > in GA, Mobile is desktop, because they start at the OS level first and if it is blank, they stop guessing immediately.
>
> Isn't it GA's defect?
Sure, though a blank navigator.platform and missing the OS in the UA string is probably something that many software packages would not assume would be the case for web browsers. With the "the web is the platform" position, why not also remove the platform/OS/hardware from Firefox Desktop and Firefox on Android?
Even if we wrote our own analytics package and parsed Apache log files, we would have the same issuec. Google said they can catch this exception and set it to "Firefox OS", but the question is: do we want Google to do that for all GA installations in the world? They have reviewed the MDN docs on the Firefox OS user agent and feel they could match it and set the OS to "Firefox OS" instead of "not set".
Yes, feature-based detection is best, but this bug is about Google Analytics and we use it to learn and improve the website experience. This bug isn't specifically about varying website content based on operating system and/or browser.
Comment 16•12 years ago
|
||
> With the "the web is the platform" position, why not also remove the platform/OS/hardware from Firefox Desktop and Firefox on Android?
Then why do we want to be detected by GA in the first place?
Comment 17•12 years ago
|
||
Oh, the irony...
GA sets more than just Firefox OS as OS not set, so I'm wondering how all this could be affected by it. I don't know why that happens. But if that happens from failure of other Firefoxes to send the whole UA (and I suspect that there's some of that) we would be over-assigning traffic to FxOS.
For reference, in SUMO we have 45k visits coming from (not set) and Firefox over the last 5 months. That doesn't sound like FxOS traffic to me (it's pretty stable since the day we integrated GA in SUMO.
It's a tricky situation.
Reporter | ||
Comment 18•12 years ago
|
||
(In reply to Ibai Garcia [:ibai] from comment #17)
> Oh, the irony...
>
> GA sets more than just Firefox OS as OS not set, so I'm wondering how all
> this could be affected by it. I don't know why that happens. But if that
> happens from failure of other Firefoxes to send the whole UA (and I suspect
> that there's some of that) we would be over-assigning traffic to FxOS.
>
> For reference, in SUMO we have 45k visits coming from (not set) and Firefox
> over the last 5 months. That doesn't sound like FxOS traffic to me (it's
> pretty stable since the day we integrated GA in SUMO.
>
> It's a tricky situation.
Yeah, Firefox + OS=(not set) on mozilla.org .15% of all traffic and about the same amount on SUMO. I would imagine on a site like marketplace.firefox.com post-Firefox OS launch, it will be a decent percentage.
Google said "Note that '(not set)' is actually exclusively reserved for situations when the given dimension, in this case Operating System, is unidentifiable.".
Google said that they can set the OS manually to "Firefox OS" when Browser = Firefox, Mobile = Yes, and OS = (not set). I just don't think that is very reliable. If you look at screen resolutions on SUMO where Browser = Firefox and OS = (not set), the most common resolution is 1024x768 and that can't be FxOS! On marketplace, the most common resolution where Browser = Firefox and OS = (not set) is 320x480 and there is a good chance that is the Firefox OS visitors or part of them.
Very tricky situation to really guess with GA and I don't think it will be very accurate. Need something better.
Reporter | ||
Comment 19•12 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #16)
> > With the "the web is the platform" position, why not also remove the platform/OS/hardware from Firefox Desktop and Firefox on Android?
>
> Then why do we want to be detected by GA in the first place?
In regards to marketplace, to understand how Firefox OS users are using marketplace on an aggregate anonymous level, make changes, and see if it helps and hurts key metrics. Yes, we can do that on an aggregate level and platform-agnostic, but I imagine that we will be requested to show that filtered down to Firefox OS users. No easy solution here. I just want people to be aware now before others assume the data available.
Comment 20•12 years ago
|
||
Should we escalate this?
It seems like it's the usual dichotomy at Mozilla of Data/Product Development vs Privacy/User Sovereignty. I don't really feel that we have many solutions here and the story around the UA is pretty much done deal.
Maybe the solution needs to come from a completely different angle.
Comment 21•12 years ago
|
||
I cc:ed David and Peter earlier today.
Reporter | ||
Comment 22•12 years ago
|
||
Engagement leadership are all aware of this and I am going to schedule a meeting to get everyone on the same page.
Reporter | ||
Comment 23•12 years ago
|
||
Update from Google Analytics: They can *only* use the user-agent string for detecting device/OS/platforn. They cannot do feature-based detection via JavaScript.
Comment 24•12 years ago
|
||
Chris,
Are we ok to close this now? We are seeing FxOS appear in GA now.
Gareth
Reporter | ||
Comment 25•12 years ago
|
||
All looks good to me! Thanks
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•