Skip to content
Calculate the Top Site Compatibility Index metric
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Build Status

Calculate the Top Site Compatibility Index web compat metric.


Requires Node 8+ and a Google Cloud Platform service account. You need to create a service account and download the JSON file containing the authentication credentials. Put that file in the project workspace as credentials.json.

Copy config.json.example in the project workspace to a file named config.json and edit accordingly, notably the API keys for Bugzilla and GitHub. You can omit any keys where the defaults would suffice. Here is what a commented config.json.example would look like:

  // The size of the Tranco list to download, up to 1 million sites.
  "listSize": 500,
  // The directory that will be used to store the downloaded list.
  "listDir": "data/",
  // The Bugzilla API authentication key.
  "bugzillaKey": "",
  // The GitHub API authentication key.
  "githubKey": "",
  // A list of domains to ignore when fetching bug results.
  "ignoredDomains": [
  // Whether we should ignore Fenix bugs (since it's pre-release)
  "ignoreFenix": true,
  // A list of GitHub accounts to ignore bugs from (QA)
  "ignoredGitHubAccounts": [
  // A QA email domain for ignoring Bugzilla bugs
  "ignoredQADomain": "",
  // A cutoff date for calculating the TSCI (if not a Sunday, will be rounded to the next Sunday).
  // E.g. a value of "2019-03-01" would lead to using "2019-03-03" (March 1st was a Friday).
  "maxDate": null,
  // The earliest date to consider for when the bug or issue has to have been
  // filed. By default 2018-01-01 is used.
  "minDate": "2018",
  // The ID of a spreadsheet to append to.
  "spreadsheetId": null,
  // A list of Google accounts with whom the final spreadsheet should be shared.
  "writers": [

Then run:

npm install
npm start

A single argument may also be provided to specify a cut-off date, providing a best-effort view of what the historical results would have been, had the program been run at that date. Note that the end of the week for the given date is what is actually used, regardless of the day-of-week specified. For instance, this will return issue-counts up to and including Saturday May 25 2018:

npm start 2019-05-23

A --resume option also exists, to continue collecting weekly results until the present date, rather than just a single weekly result:

npm start 2019-05-23 -- --resume

Code of Conduct

This project and repository is governed by Mozilla's code of conduct and etiquette guidelines. For more details please see the Code of Conduct file.

You can’t perform that action at this time.