{"id":13725588,"url":"https://github.com/browserslist/browserslist-ga","last_synced_at":"2025-05-07T20:32:55.676Z","repository":{"id":52839865,"uuid":"124756280","full_name":"browserslist/browserslist-ga","owner":"browserslist","description":"🦔 Target browsers tailored to your audience using Google Analytics","archived":true,"fork":false,"pushed_at":"2023-04-03T10:16:57.000Z","size":518,"stargazers_count":305,"open_issues_count":15,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-04T12:17:23.059Z","etag":null,"topics":["browserslist","caniuse","google-analytics"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/browserslist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-11T12:54:29.000Z","updated_at":"2025-05-01T14:57:56.000Z","dependencies_parsed_at":"2024-06-18T18:14:48.640Z","dependency_job_id":"068ec8ef-35db-4b72-bbbb-f74911dda909","html_url":"https://github.com/browserslist/browserslist-ga","commit_stats":{"total_commits":74,"total_committers":7,"mean_commits":"10.571428571428571","dds":"0.21621621621621623","last_synced_commit":"c9678a53fbb5efba333f9da6ec0aac2633245e25"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserslist%2Fbrowserslist-ga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserslist%2Fbrowserslist-ga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserslist%2Fbrowserslist-ga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserslist%2Fbrowserslist-ga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/browserslist","download_url":"https://codeload.github.com/browserslist/browserslist-ga/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252953716,"owners_count":21830890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browserslist","caniuse","google-analytics"],"created_at":"2024-08-03T01:02:28.332Z","updated_at":"2025-05-07T20:32:55.351Z","avatar_url":"https://github.com/browserslist.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cimg width=\"520\" height=\"68\" src=\"./logo.svg\" alt=\"Browserslist-GA logo\"\u003e\n\nTarget browsers tailored to your audience.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003e\u003cem\u003eInterested in a bot that does all of this for you?\n    \u003ca href=\"https://goo.gl/forms/WPS13gLAJTwqWQyy1\"\u003eClick here!\u003c/a\u003e\n  \u003c/em\u003e\u003c/strong\u003e\n\u003c/p\u003e\n\n---\n\n## How to use\n\nIn the root directory of your project run:\n\n```yaml\nnpx browserslist-ga\n```\n\n_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+, for older versions run `npm install -g browserslist-ga` and then `browserslist-ga`)_  \n_(to run the latest code directly from GitHub, execute `npx github:browserslist/browserslist-ga` instead)_\n\nYou'll be asked to login with your Google Account (please see [this issue](https://github.com/browserslist/browserslist-ga/issues/26#issuecomment-568583144) if you are unable to sign in). Your access token will only be used locally to generate a `browserslist-stats.json` file in the root of your project. After finishing the steps, you can use your stats with Browserlist by adding the following to your [Browserslist config](https://github.com/ai/browserslist#config-file):\n\n```yaml\n\u003e 0.5% in my stats  # Or a different percentage\n```\n\nNote that you can query against your custom usage data while also querying against global or regional data. For example, the query `\u003e 1% in my stats, \u003e 5% in US, 10%` is permitted.\n\n## Why should I care?\n\nBrowsers update very often these days, with major releases getting published every month.\nWith each new browser version comes support for new web platform features.\nThanks to open source projects such as Autoprefixer and Babel we are able to use these features while supporting older browsers.\nBut this backward compatibility comes with a cost.\nWe can't really keep adding prefixes, polyfills and other fallbacks to support every browser ever invented.\n\nBrowserslist is an open source project that can minimize those costs by allowing you to configure which browsers you care about.\nIt is supported by tools such as\n[Autoprefixer](https://github.com/postcss/autoprefixer),\n[babel-preset-env](https://github.com/babel/babel/tree/master/packages/babel-preset-env),\n[postcss-normalize](https://github.com/jonathantneal/postcss-normalize) and many others.\nHere's how you configure Browserslist:\n\n```yaml\n\u003e 1%              # I want to support browser versions that have more than 1% of global usage\nLast 2 versions   # And the latest 2 versions of each browser\nIE 9              # And also Internet Explorer 9 specifically\n```\n\nThe global browser usage data comes from [caniuse.com](https://caniuse.com) and is downloaded from npm when you run `npm install`.\nPackage managers such as npm and Yarn will generate a lockfile with the exact version of each package that was installed.\nThis means the caniuse database that is used to perform these queries will always be the same.\nThis is great because it's predictable, but it's important to update this package from time to time to keep up with the latest stats.\nApart from remembering to update this package, there's something else you should consider:\n\n* For instance, in China there are some popular browsers that are not used in the US and Europe.\n* Or maybe your audience uses mostly mobile browsers.\n* Or maybe you are building an application for the government and need to support Internet Explorer 8.\n\nThe point being, it's important to make decisions based on your audience.\nBrowserslist-GA aims to help you with that.\nIt integrates Google Analytics with Browserslist to keep your targeted browsers updated.\n\n## Notes\n\nThere are some differences compared to the `caniuse` Google Analytics importer:\n\n* All browsers on iOS use Safari's WebKit as the underlying engine, and hence will be resolved to Safari. The  `caniuse` Google Analytics parser only converts some of the data to Safari, while the remaining is left untracked (see [#1](https://github.com/browserslist/browserslist-ga/pull/1)).\n* YaBrowser, a popular browser in russian-speaking countries, uses the Blink web browser engine and is based on Chromium. It is currently not available on `caniuse` and so is resolved to Chrome (or Chrome for Android) and the version is mapped to the nearest available version (see [#2](https://github.com/browserslist/browserslist-ga/pull/2)).\n* Just like for YaBrowser, the [same approach](https://github.com/dmfrancisco/map-to-chrome/blob/master/data/coc_coc_browser.json) is applied to the Coc Coc browser.\n\n## Kudos\n\nAll the praise goes to the humans and martians that develop and maintain [Can I Use](https://caniuse.com) and [Browserslist](https://github.com/ai/browserslist).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserslist%2Fbrowserslist-ga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrowserslist%2Fbrowserslist-ga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserslist%2Fbrowserslist-ga/lists"}