Switch back to Browser gem (LG-5189)#5483
Conversation
zachmargolis
commented
Oct 7, 2021
- Seems to be updated more recently than DeviceDetector
- See JIRA, examples of mobile being detected incorrectly
- With a cache layer, performs similarly
- Seems to be updated more recently than DeviceDetector - See JIRA, examples of mobile being detected incorrectly - With a cache layer, performs similarly
| browser_platform_name: browser.platform.name, | ||
| browser_platform_version: browser.platform.version, | ||
| browser_device_name: browser.device.name, | ||
| browser_mobile: browser.device.mobile?, |
There was a problem hiding this comment.
I changed browser_device_type to browser_mobile because that seems to be how we mostly use this property throughout the codebase
Browser gem doesn't provide a simple device type, but if we really cared, we could re-implement it similar to the way ahoy gem does:
There was a problem hiding this comment.
Personally I've only ever used it to query mobile or desktop, so no opposition from me 🤷
May be worth a quick glance to see if we're relying on this in any existing dashboards.
There was a problem hiding this comment.
A quick source code search only showed usages outside this repo in our deprecated/defunct analytics ETL pipeline
There was a problem hiding this comment.
👏🏼
(also sorry I created a merge conflict in #5485)