browserslist / browserslist-ga

🦔 Target browsers tailored to your audience using Google Analytics
MIT License
303 stars 18 forks source link

Account for deprecated isMobile dimension #14

Closed galvarez421 closed 4 years ago

galvarez421 commented 5 years ago

Following up on galvarez421/browserslist-ga-export#3, the isMobile dimension being used by this package is deprecated per https://developers.google.com/analytics/devguides/reporting/core/v2/changelog.

I believe changes would only need to be made in the following places:

https://developers.google.com/analytics/devguides/reporting/core/v2/changelog suggests that it would be as simple as replacing ga:isMobile with ga:deviceCategory and entry[4] == "Yes" with entry[4] == "mobile", but https://analyticscanvas.com/google-analytics-ismobile-istablet-left-building/ suggests that it should be entry[4] == "mobile" || entry[4] == "tablet". Perhaps further research is needed on this point...

Also, the deprecation notice was published back in 2012 and according to the data deprecation policy, the dimension should have been removed a while ago, so not sure how urgent this is... but there does seem to be at least some path to migrating to the new dimension.