# See which routes, countries and referrers send your traffic

Gregale · Updated 2026-12-05

gregale metric requests breaks traffic down by route, country, referrer, client type or status, with errors and p95 per group, counted at the gateway. Tested.

**Gregale counts every request at its gateway, so `gregale metric requests`
breaks an app's traffic down by route, country, referrer, client type or
status code, with errors and latency for each group, and nothing to add to
your pages.** It works the same for an API that has no pages at all. In the
production run below, 27 requests showed up grouped by route template,
referrer host and client about a minute after they were sent.

**[Follow the run](#verified-on-gregale-december-5-2026)**, or jump to
[the commands](#break-down-requests).

## What gets counted

The gateway records each request that reaches an app through its public URL
and folds it into per-minute counts, one set per breakdown:

| `--by`          | Groups requests by                         | Example from the run              |
| --------------- | ------------------------------------------ | --------------------------------- |
| `route`         | Method and route template, with IDs folded | `GET /api/orders/{id}`            |
| `referrer_host` | The host of the `Referer` header           | `news.ycombinator.com`            |
| `country`       | The country the request came from          | `TR`                              |
| `ua_family`     | The kind of client                         | `chrome`, `safari`, `curl`, `bot` |
| `status`        | The HTTP status                            | `200`, `403`                      |
| `consumer_id`   | The API consumer that made the call        | not part of this run              |

Each group gets its request count, its errors (status 400 and above) and its
p50, p95 and p99 latency. The counts store no IP address, raw User-Agent,
full referrer URL, cookie or request body; that is how the
[data processing terms](https://gregale.dev/docs/dpa.md) describe request analytics.

## Verified on Gregale, December 5, 2026

The test sent 21 requests to a small HTTP app, `storefront`, in 11 seconds:
6 to `/pricing` with a Hacker News referrer, 4 and 3 to `/blog/scale-to-zero`
from Google and ChatGPT, 2 from an iPhone to `/docs/start`, 3 from curl to
`/api/orders/42`, 2 from GPTBot (refused with `403` by an edge rule from an earlier test of
AI crawler controls) and 1 from Googlebot. Analytics for the window were complete about a minute later.

`gregale metric requests storefront --since 5m --by route`:

| Route                     | Requests | Errors | p95   |
| ------------------------- | -------- | ------ | ----- |
| `GET /blog/scale-to-zero` | 9        | 2      | 5 ms  |
| `GET /pricing`            | 7        | 0      | 86 ms |
| `GET /api/orders/{id}`    | 3        | 0      | 5 ms  |
| `GET /docs/start`         | 2        | 0      | 5 ms  |

`/api/orders/42` was counted as `/api/orders/{id}`, so every order counts
toward one route rather than one row per ID. The 2 errors on the blog post
are the refused GPTBot requests. The window also held 6 requests from the
earlier crawler test, so the totals are a little higher than what this test
sent.

`--by referrer_host` gave `news.ycombinator.com` 6, `www.google.com` 4 and
`chatgpt.com` 3. `--by ua_family` gave `chrome` 14, `bot` 8 (7 of them
refused), `curl` 3 and `safari` 2: crawlers and scripts are counted apart
from people, so they do not hide in the page counts. `--by country` gave
`TR` 27, where the test machine was. Every summary also gave the window's
cold starts and latency percentiles, and marked telemetry completeness as
unknown.

## Break down requests

```bash
gregale metric requests my-api --since 1h --by route
gregale metric requests my-api --since 24h --by referrer_host
gregale metric requests my-api --since 7d --by country
gregale metric requests my-api --since 1h --by ua_family   # people, bots, scripts
gregale metric requests my-api --since 1h --by status
```

`--until` ends the window at a set time, for example to look at the hour of
an incident. The dashboard reads the same counts (not part of this run), and
[`gregale metric resources`](https://gregale.dev/articles/find-which-app-endpoint-drives-cloud-bill)
shows which routes the app's memory and CPU peaks come from.

## How other platforms show traffic

Checked on each vendor's own pages on December 5, 2026:

| Platform                 | How it is measured                                           | Route or path          | Country       | Referrer    | Client type            | Status     |
| ------------------------ | ------------------------------------------------------------ | ---------------------- | ------------- | ----------- | ---------------------- | ---------- |
| Vercel Web Analytics     | A script in your pages; Hobby includes 50,000 events a month | Yes                    | Yes           | Yes         | Browser and OS         | Not listed |
| Vercel Observability     | Server side; breakdown by path needs Observability Plus      | Plus                   | Not listed    | Not listed  | Not listed             | Yes        |
| Netlify Web Analytics    | Server side                                                  | Top pages              | Top locations | Top sources | Not listed             | 404s only  |
| Cloudflare Web Analytics | A JavaScript snippet, added automatically on proxied sites   | Yes                    | Yes           | Yes         | Browser, OS and device | Not listed |
| Render                   | Server side, web services only                               | Filter by host or path | Not listed    | Not listed  | Not listed             | Yes        |
| Railway                  | Server side, through RailQL in early access                  | Yes                    | Not listed    | Not listed  | Not listed             | Yes        |
| Gregale                  | Server side, at the gateway                                  | Route templates        | Yes           | Host        | Yes                    | Yes        |

**Choose something else when:**

- **You need visitors, sessions or funnels.** Gregale counts requests, not
  people: a page that loads 20 files is 20 requests. A script-based tool such
  as Vercel Web Analytics or Cloudflare Web Analytics counts page views and
  visitors.
- **You need months of history.** Gregale keeps request analytics for 3 days
  on Hobby, 7 on Pro and 14 on Scale; Vercel Web Analytics keeps 12 months on
  Pro.
- **Your site is served by a CDN in front of Gregale.** Requests the CDN
  answers from its cache never reach the gateway and are not counted.

## Limits

- Request analytics come with the paid plans. Hobby costs
  $10 a month; the Free plan keeps no request analytics.
- Each minute keeps a bounded number of distinct countries, referrers,
  client types and consumers, and counts the rest as `__other__`. Routes are
  not folded this way.
- Latency percentiles come from buckets: 10 ms wide up to 100 ms, and at
  most 25% above the true value from 100 ms to 10 seconds.
- Requests that never reach your app's public URL, such as the warm-up
  requests Gregale sends before taking a snapshot, are not counted.

## Sources

Gregale facts come from the production run above, the
[data processing terms](https://gregale.dev/docs/dpa.md), the
[scale-to-zero docs](https://gregale.dev/docs/scale-to-zero.md), the plan limits in the platform
source and `gregale metric requests` in CLI rc.396. Other platforms, checked
December 5, 2026:
[Vercel Web Analytics](https://vercel.com/docs/analytics),
[Vercel Web Analytics pricing](https://vercel.com/docs/analytics/limits-and-pricing),
[Vercel Observability](https://vercel.com/docs/observability),
[Netlify Web Analytics](https://docs.netlify.com/manage/monitoring/web-analytics/overview/),
[Cloudflare Web Analytics](https://developers.cloudflare.com/web-analytics/),
[Cloudflare Web Analytics dimensions](https://developers.cloudflare.com/web-analytics/data-metrics/dimensions),
[Render service metrics](https://render.com/docs/service-metrics),
[Railway RailQL](https://docs.railway.com/observability/railql).

## Questions

### How do I see which pages or API routes get the most traffic on Gregale?

Run gregale metric requests APP --since 24h --by route. The gateway counts every request that reaches the app through its public URL, so there is nothing to add to your code or pages, and IDs are folded into route templates such as GET /api/orders/{id}.

### Can I see where my traffic comes from without Google Analytics?

Yes. gregale metric requests APP --by referrer_host groups requests by the host of the Referer header, such as news.ycombinator.com or chatgpt.com, and --by country groups them by country. No script, cookie or IP address is involved.

### Does it separate bots from people?

Yes. --by ua_family groups requests into kinds of client such as chrome, safari, curl and bot. In the production run, 8 crawler requests were counted as bot, apart from the 16 browser requests.

### How long does Gregale keep request analytics?

3 days on Hobby, 7 on Pro and 14 on Scale. The Free plan keeps none. For months of history or visitor counts, use a script-based analytics tool alongside it.

### What does each breakdown show?

For each route, country, referrer, client type or status: the number of requests, the errors (status 400 and above) and the p50, p95 and p99 latency, plus the cold starts and latency of the whole window.

Canonical URL: https://gregale.dev/articles/request-analytics-route-country-referrer-no-script

