Skip to content
Source
Sign inSign up

See clones and visits

Code and repositories / Repository settings

See who clones and visits your repository

You put work into a repository, and you want to know if people use it. The Insights tab shows the clones, the page views, the reading time, the countries and sites that visitors come from, and who made each clone.

6 min read

You need write access to the repository. Without it, the web page is "not found", and src gets an error.

1. Open Insights

Open the repository, then click the Insights tab (/@<owner>/<repo>/insights).

In a terminal, in your clone:

src repo insights

2. Pick a range

At the top right of the page, click 14 days, 30 days, 90 days or 1 year. 14 days is the default. Each range has its own URL, for example ?range=30d.

In a terminal:

src repo insights --range 30d

Each tile shows the total of the range, and the change from the range before it of the same length. For example, 30 days compares with the 30 days before.

Note

The reading time tile shows a median, not a total. 1 year shows no change, because Source keeps the traffic for one year only.

3. Read the tiles

TileWhat it counts
ClonesEach git clone of the repository. A shallow or partial clone counts too.
Unique clonersThe different people, agents and CI jobs that cloned, on each day.
ViewsEach page of the repository that the web app shows.
Unique visitorsThe different visitors of those pages, on each day.
ForksThe forks made on each day.
Median reading timeHow long a page of the repository stays visible: half of the pages are read for less time, half for more. Each opened page counts once, with its longest visible time. With no data, the tile shows No data.

4. Read the charts and the tables

The charts below the tiles:

  • Clones: clones and unique cloners per day. Turn on Show fetches to see the fetches too. A fetch is a git fetch or git pull that updates a clone that someone already has.
  • Views: page views and unique visitors per day.
  • Clones by caller: who made the clones of each day.
    • People: a person with their own login, or a signed-out person on a public repository.
    • Agents: an agent with its agent token.
    • CI: a CI job or a factory job.

The three tables at the bottom:

  • Top referrers: the 10 sites that sent the most visitors. Only the site name is kept, for example news.ycombinator.com. A link from Source itself does not count.
  • Popular paths: the 10 pages of the repository with the most views. The query and the part after # are not kept.
  • Top countries: the 10 countries with the most page views. A country with fewer than 3 different visitors is not shown, so a small repository cannot point to one person.

Note

A signed-out visitor gets a new id on each full reload, so one person can count as more than one visitor.

Done

You see:

  • How many people, agents and CI jobs clone your repository.
  • How many people visit it, and how long they read.
  • Where the visitors come from, and which sites send them.

To learn what Source records about the visitors, read What Source tracks, and how to turn it off.

To see how many people download your npm packages, read See npm downloads of your packages.

Read the traffic from a script or an agent

An agent or a script reads the same numbers with src, REST or MCP. The token needs write access to the repository. Each one takes a range: 14d (the default), 30d, 90d or 1y.

With src:

src repo insights acme/app --range 30d --json totals

--json days gives the numbers of each day, with byCaller for the clones by people, agents and CI.

With REST:

curl -H "Authorization: Bearer $TOKEN" "https://source.tanstack.com/api/v1/repos/acme/app/insights?range=30d"

The answer has these fields:

  • days: one entry for each day of the range, oldest first.
  • referrers and paths: the top 10 of the range.
  • totals: the sums of the range.
  • previousTotals: the sums of the range before. It is null for 1y.

With MCP, call the tool get_repo_insights with owner, repo and range. It gives the same answer as REST. See Connect over MCP.

Reading time and countries

With src:

src repo insights acme/app --range 30d --json readingTime,countries

Each field is null when the analytics database does not answer.

With REST:

curl -H "Authorization: Bearer $TOKEN" "https://source.tanstack.com/api/v1/repos/acme/app/insights/audience?range=30d"

The answer has these fields:

  • readingTime.medianMs: the median reading time of the range, in milliseconds. It is null when the range has no data.
  • readingTime.previousMedianMs: the same for the range before. It is null for 1y.
  • countries: up to 10 entries, each with country (a two-letter code, for example DE) and views.

If the analytics database does not answer, the route answers 503.

With MCP, call the tool get_repo_audience with owner, repo and range. It gives the same answer as REST.

Reference

What "unique" means

A unique count is for one day:

  • A signed-in person counts once a day, by their account.
  • A signed-out visitor counts once a day, by their IP address and browser.
  • Each CI job counts as one cloner.

A range shows the sum of the daily counts. A person who visits on 3 days of the range counts 3 times.

Source never stores the visitor itself. It stores a hash of the visitor, made with a random value of that day. After the day ends, Source deletes the random value, and then the hashes. After that, nobody can match a visitor of one day to a visitor of another day.

Other things to know:

  • Days are in UTC.
  • Bots and crawlers that Source detects do not count as views.
  • Some bots look like a browser and send each page from a different IP address. Source finds them by their browser: when 50 or more signed-out visitors with the same browser open a repository on one day, and they open fewer than 1.05 pages each, they are one bot. The bot counts as 1 visitor and 0 views, and its pages and referrers are not in the top lists.
  • A view counts only for a person who can read the repository.

Where reading time and countries come from

The Median reading time tile and the Top countries table come from the usage analytics of Source. The other tiles, charts and tables use a separate traffic count. As a result:

  • A person who turned off Share usage analytics is not in them. A browser with Do Not Track or Global Privacy Control on is also not in them.
  • The usage analytics started on 2026-11-05. The days before have no reading time and no countries.
  • They load after the rest of the page. If the analytics database does not answer, the page shows "Reading time and countries are not available now."

Insights and rankings

Public repository rankings use separate qualified traffic counts. Insights includes total traffic, so its counts can be higher.