Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to DevicesDetection plugin #213

Merged
merged 111 commits into from Feb 10, 2014
Merged

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Jan 28, 2014

  • added/enhanced/fixed quite many detection rules for different devices
  • added/improved detection of some browsers/os
  • added "Device detection" tool to admin, so every user (admin) can check if a useragent is correctly parsed (including the possibility to show a list of all brands/browsers/os/device-types known to piwik)
  • improved detection code in useragentparserenhanced
  • added new device type 'smart display'
  • added possibility to translate device types

Could anyone please have a closer look before merging? Thx.

…tters before the searched regex as there are many incorrect detected devices otherwise (eg. searching for LG phones with 'LG' only also matched 'Coolgen E70')
…nt like pt-br or pt-pt should not be detected as pantech device
…be used in case insensitive mode; see UserAgentParserEnhanced::matchUserAgent
@sgiehl
Copy link
Member Author

sgiehl commented Feb 10, 2014

I'll merge that pull request now. There are already a lot of improvements in it.
We now have 1015 tests for the useragent parser (covering nearly all os and browsers that are detectable by now). The detections takes around 2.3 seconds, which means around 2,3 ms per detection.
We still need to improve some detections and we need to think about the browser & os families again as they are currently not very useful. Followups to this and other improvements will be discussed here: http://dev.piwik.org/trac/ticket/4215

sgiehl pushed a commit that referenced this pull request Feb 10, 2014
refs #4215 #3505  Improvements to DevicesDetection plugin
@sgiehl sgiehl merged commit a9641b6 into master Feb 10, 2014
@sgiehl sgiehl deleted the devicedetectionimprovements branch February 10, 2014 18:24
@tobias-reese
Copy link

Excellent work Stefan! I plan to put some work into this to place some extension points to the Device Detection and some settings. I think this will lead into the opposite direction regarding the optimisation efforts discussed here, but we need some tweaks to use the full potential of piwik and would take the downside of this. Just a few Examples:

  • We would like to add a lot of specific device Information to distinguish devices.
    Small example: the current Version would detect "Dalvik/1.4.0 (Linux; U; Android 2.3.3; GT-I9100 Build/GINGERBREAD)" as "GT-I9100". But this device is well known as Galaxy S II and the Modell in our opinion should be "GT-I9100 (Galaxy S II)". I guess all this information isn't appreciatet by all piwik users (additional regexes), so my thought was to indroduce a folder where people who love more detailed information can place custom regexes for mobiles etc. which take precedence against the "normal" regexes.
  • We have several sites where iPhone Apps connect to webservices using UserAgents like this: "Ourapp/2086 CFNetwork/672.0.8 Darwin/14.0.0". Where Ourapp is the appname and 2086 the build number. I would like to introduce a setting for the device detection to translate this into dynamically created Browsers so the Device Section has some insights on used app versions.

Any thoughts on this? Should i file this somewhere else since a closed pull request dosn't some the right place to discuss these additions.

@sgiehl
Copy link
Member Author

sgiehl commented Feb 20, 2014

The next step will be to combine UserSettings and DevicesDetection plugins and to enable it by default.
Maybe you could create a ticket for the changes you would like to have at http://dev.piwik.org.
If you plan to implement anything on your own, feel free to create a pull request.

@mattab mattab added c: i18n For issues around internationalisation and localisation. and removed c: i18n For issues around internationalisation and localisation. labels Oct 13, 2015
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. c: i18n For issues around internationalisation and localisation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants