podigee/device_detector

Update to the latest regex of original Piwik

Closed this issue · 2 comments

Hi, first thanks for this wonderful and powerful gem.

We run into an issue that took a long time to understand.

Actually we found out that the reason our app has wrong behavior is sue to device detector gem.
Indeed on UC browsers, the original Piwik fixed the issue in order not to output "Chrome" but UC Browser a major browser (in Asia notably).
See matomo-org/device-detector#5617

But in our tests on various UC Browsers, for example on the user agent below, the original piwik after their fix now righfully output client name =uc browser, but ruby device Detector Gem still wrongly output "Chrome"

User agent example
Mozilla/5.0 (Linux; U; Android 4.2.2;en-US;Darkmoon Build Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.0.0.1088 Mobile Safari/537.36

I think it's due to the fact the folder regexes was last updated 11 months ago but the fix in the piwik yaml regexes was done in may 2017, which is before those 11 months.

Is is easy to fix ?

Thanks
M.

Hehe gonna close my own issue only 1 hour after:)

I checked the branches and spotted that, when you compare the 'master' branch with the "develop" branch (which is the "default" branch), changes had bene made on UC Browser. so I changed my gemfile to point to master and now it works.

Letting top contributors close the issue to know I did a real life test that all is working now on those piece of changes on "master":)

Solved in 5cdc27c