Meteor-Community-Packages/meteor-user-status

Request: Break down the userAgent string for easy aggregation

Offen

#100 geöffnet am 19.05.2016

 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (86 Forks)batch import
good first issue

Repository-Metriken

Stars
 (560 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

I'd love to see the UserAgent string broken down into more fields. This would allow a developer to easily write queries and aggregations based on the different parts of the string. I'd love to use this to see how many users are on a particular platform. But right now this is difficult because if a user happens to use safari/601.1 and another uses safari 600.1, these strings are considered separate even though the browser is still Safari.

Based on the Wikipedia explanation of the different parts, you could have

userAgent: {
  fullString: 'Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405',
  systemDetails: 'iPad; U; CPU OS 3_2_1 like Mac OS X; en-us',
  browserPlatform: {
    name: 'AppleWebKit'
    version: '531.21.10',
  }
  browserPlatformDetails: 'KHTML, like Gecko',
  enhancements: 'Mobile/7B405',
}

Contributor Guide