Skip to content
New Bring your history: import it from Google Analytics, Plausible, Simple Analytics, Umami, Matomo or GoatCounter, on every plan

GitHub

Follow GitHub repositories to see their stars, forks and releases beside your traffic, every star, issue and pull request in the feed through a webhook, and their traffic through mettr's GitHub App.

If your product is open source, or ships an SDK, its GitHub repository says who noticed it: a post that brought visitors often brings stars too. mettr reads public repositories by their name and, through a webhook, puts what happens on them in the feed as it happens. GitHub comes with the Pro plan: 10 repositories a site on Pro, 50 on Business.

There are three ways in, each adding to the one before:

By name + Webhook + GitHub App
You give the repository's name a webhook on the repository or the organization the app, installed on the repositories you choose
Stars, forks, open issues and pull requests every five minutes every five minutes every five minutes
Stars by day since the repository began yes yes yes
Stars in the feed "+3 stars", within minutes, no names each one at once, by login each one at once, by login
Releases in the feed and under the chart within five minutes at once within five minutes
Forks, issues, pull requests, discussions in the feed no at once, by login at once, by login
Traffic: views, clones, referrers, popular pages no no copied daily
Private repositories no their events only their events only

Follow a repository

In the site's settings, GitHub, choose Follow repository and type the repository as owner/name, or paste its address. mettr asks GitHub first and refuses a name that is not a public repository.

Any public repository can be followed, your own or anyone's: its numbers are public, so a competitor's stars can sit beside yours. A repository is read once for every site that follows it, and dropped from mettr when the last site stops.

Only people who manage the site can follow or stop following a repository. Both are recorded in mettr's audit log.

What is read

  • Counts, every five minutes: stars, forks, watchers, open issues and open pull requests, and whether the repository is archived.
  • Stars by day, once a day, from GitHub's star history: the first read goes back to the repository's first week.
  • Releases, every five minutes, with the downloads of their files. A new one is a github.release event of the site, in the feed and in alerts, and a release note under the traffic chart.
  • Stars gained since the last check are a github.stars event with their number (stars). GitHub no longer says who starred a repository to anyone but its admins, so by name a star has no login.

The first read brings the past in quietly: only stars and releases that come after it become events.

Add the webhook

For each star, fork, release, issue, pull request and discussion at once, with the login of whoever did it, add a GitHub hook under the site's settings, Deploys, and in GitHub's webhook form tick Stars, Forks, Releases, Issues, Pull requests and Discussions beside the event that marks a deploy. A hook on an organization covers every repository in it. The hook gives mettr no access to the repository, and brings nothing from before it was added.

Each delivery is checked against the hook's secret before anything in it is read, then becomes an event of the site:

Event When Props
github.star someone stars the repository repository, login
github.fork someone forks it repository, login
github.release a release is published repository, tag, title
github.issue an issue is opened repository, login, number, title
github.pull_request a pull request is opened repository, login, number, title
github.discussion a discussion is started repository, login, number, title

A row in the feed names the GitHub login and links to the profile, the issue or the release; nothing else about the person is kept. GitHub's "Watch" event is its old name for a star: mettr reads stars from the Stars event and leaves Watch alone, so a star is never counted twice.

A public repository the webhook sends is followed by the site, while the plan has room, so its counts and history come too; its stars then come only by login, not also as a count. A private repository sends its events only. Removing the GitHub hook lets the five-minute count take over again.

Events from GitHub have no visitor: they never count toward the plan's events, the people online or the visitors. Use them like any other event, in labels, filters, tiles and alerts.

Install the GitHub App

GitHub keeps a repository's traffic (views and clones by day, and the top referrers and pages) for 14 days, and shows it only to people who can push to the repository. mettr's GitHub App reads it for you and copies it every day, so it is kept for good.

In the site's settings, GitHub, choose Install the GitHub App. GitHub asks where to install it and on which repositories, then sends you back. mettr links the installation only once GitHub confirms it is one you can see, so nobody can link someone else's.

  • What it asks for: read access to the repositories' metadata, issues, pull requests and discussions, and to their administration settings, read only. GitHub gives an app a repository's traffic only with that last one; the app reads the traffic and nothing else there, and changes nothing. It does not read your code.
  • What it brings: the public repositories it may read are followed by the site, while the plan has room. Once a day mettr copies their views and clones by day, as GitHub has them for the last 14 days, and their top referrers and pages as GitHub counts them over those days. Their stars, forks, issues, pull requests and discussions come into the feed as they happen, with no webhook to add.
  • Traffic is yours: the traffic is kept for your site alone. Another site that follows the same repository by name never sees it.

An organization's installation can be linked to several of your sites. Unlinking it here stops the copies and the events; the traffic copied so far stays, and the app stays installed until you remove it on GitHub (Settings, Applications). Removing or suspending it on GitHub unlinks or pauses it here too.

GitHub counts many clones by machines (CI, mirrors, bots): read clones as a trend. Unique visitors and cloners are GitHub's per day, so a total over a range adds up each day's.

Panels

A site that follows a repository gets its panels, at the bottom of the default canvas:

  • GitHub stars: stars gained by the site's repositories over the range, against as many days before, with how many they have in all.
  • Stars by repository: a stacked bar a repository, by day.
  • Repositories: each repository with its stars, forks, open issues and pull requests, its latest release and the stars it gained against the days before.
  • GitHub traffic (with the app): views, visitors, clones and cloners by day, across the repositories.
  • GitHub referrers and GitHub popular pages (with the app): where visitors came from and what they looked at, over GitHub's last 14 days, as the latest copy in the range has them.

The page's filters do not narrow them: stars and traffic are not the site's events.

For one repository's stars alone, as a tile or a chart, make a panel of it: Add panel, New panel, then Data, GitHub stars, and the repository (see your own panels).

On the Free plan

A team back on Free keeps the repositories it follows and what was read of them, but they are not read again, its traffic is not copied, and webhook deliveries are answered and left, until it upgrades.

Updated · This page as Markdown · Something unclear? [email protected]

Search the docs, features, comparisons, blog and changelog