Menu

Traffic statistics

The summary every site gets (requests, data, pages, errors, the cache; nothing about visitors) and the optional detailed statistics: what is recorded, for how long and where, the privacy signal, export, charges, and your role as controller of your visitors' data.

Every site you serve from your storage gets a summary of its traffic, included with storage: how many requests, how much data, which pages, which errors, how much came from the cache. It is made from the gateway's own log and holds nothing about who visited.

Detailed statistics are separate and off unless you switch them on, one site at a time: visitors and visits per day, referring sites, countries, browser, system and device families, bots, entry pages. They are charged by the hour while on, and switching them on makes you the controller of your visitors' data.

In the application: Statistics (from the menu, or Hosting → Statistics). From the terminal, weird stats; for an assistant, the stats toolset of weird mcp.

$ weird stats sites$ weird stats summary www.example.ro$ weird stats today www.example.ro$ weird stats pages www.example.ro --missing

What has statistics#

GET /ipfs/stats/subjects lists everything of yours that was requested in a range (the last 30 days unless you say from and to), each a subject with its kind:

KindSubject
domaina hostname of yours, free addresses included (www.example.ro, ana.e-weird.ro)
nameone of your names
pina pin's shareable link (/ipfs/<pin-id>/ipfs/<cid>), by pin id
contenta content's own address (<cid>.ipfs.<gateway domain>) and its bare /ipfs/<cid> link, counted for the account billed for that traffic

A range is at most 400 days per request.

The summary#

GET /ipfs/stats/summary?subject=www.example.ro&from=2026-11-01&to=2026-11-19 answers, per UTC day:

  • requests (every status) and served_requests (answered with content), bytes and served_bytes;
  • hot_bytes and cold_bytes, with cache_hit_ratio_bytes and cache_hit_ratio_requests: the share served from the gateway's cache rather than fetched from storage;
  • status: the counts of 2xx, 3xx, 4xx, 5xx, and exactly 404 and 451;
  • by_hour: 24 counts, UTC hours;
  • and totals over the range.

A pin's summary also covers its content's own address when that traffic is billed to you (parts says what it covers).

  • Pages: GET /ipfs/stats/paths?subject=…&day=… answers the day's most requested paths (kind=top, the default; error is how far a count may be over, on very varied sites) and the paths answered not found (kind=404: links to fix). A path never carries its query string; a very long one is cut. day defaults to yesterday.
  • Today: GET /ipfs/stats/today?subject=… answers today's running counters, updated within minutes (updated_at). The day's full summary, with its hours and pages, follows after the day ends.

What it is made from. The gateway's log of host, path without its query, status, size, cache tier and hour. No address, no browser identification, no cookie: nothing about the visitor. The numbers are as logged; your bill is authoritative.

How long. Daily summaries are kept 400 days by default (the operator's setting, between 30 and 1100 days).

Detailed statistics#

For a hostname of yours (not a pin or a content address), once you switch them on. Per UTC day:

  • visitors: people counted once per site and day; visits: a visit ends after 30 minutes without a request;
  • requests, bytes, bot_requests (declared crawlers) and automated_requests (an unusually fast client);
  • hours: the same per UTC hour;
  • top lists: referrers (the referring site's host name only), countries (two-letter codes, -- unknown), browsers, os, devices (desktop, mobile, tablet, bot, other), entry_pages, not_found (missing pages with the site linking to them).

Read them with weird stats detail www.example.ro or GET /ipfs/stats/detail?subject=www.example.ro (dimensions picks the lists; all by default). geo names the source of the countries (IP geolocation by DB-IP, under CC BY 4.0) and its version: show it with the countries.

What is recorded about visitors, and what is not#

  • On the gateway node that answers the request, for a site with detailed statistics on, a separate log holds the time, the visitor's address, the path (without its query), status, size, referrer and browser identification, one file per hour. Each closed hour is processed on that node and the file deleted; a file is deleted unprocessed if it waits longer than the limit (two hours by default; the platform's setting allows at most 48 hours). The address is only looked up in a country database kept on the node (no lookup leaves it) and, with the browser's families, turned into a daily key.
  • Only aggregates leave the node: the counts, the lists and the day's counting registers. No address, browser identification or identifier is kept.
  • Days and sites are not linked. A visitor's key is made with a secret the node holds in memory for one day and destroys afterwards, and differs per site: counts cannot be linked from one day to the next or from one site to another. Within one day and one site, a visitor's requests share a key (that is how a day's visitors are counted). visitors_sum is the sum of daily visitors, not a count of unique people, and there is no monthly unique figure.
  • The privacy signal. A request sent with Global Privacy Control (Sec-GPC: 1) is never written to the detailed log: it is counted in the summary only.
  • Nothing is added to your pages: no cookie, no script, no header.
  • Counted per node. Each gateway node counts with its own key; when the same visitor is answered by two nodes on one day, they are counted once on each, so a day's visitors can be slightly over.
  • Busy hours. On a very busy hour a sample is counted (sampled says one in how many) and an hour that could not be counted is lost; the day says how many of each (sampled_hours, lost_hours). complete is false while a day's lists have not arrived.

How long. Detailed aggregates are kept 400 days by default (the operator's setting, between 30 and 1100 days); the raw hourly files at most the limit above.

Switching on and off#

In the application: open a site's statistics, Detailed statistics → switch on. The sheet shows what is and is not recorded, the credit charge, and the text you confirm. From the terminal (it shows the text and the hourly credit charge and asks first):

$ weird stats detail on www.example.ro$ weird stats detail off www.example.ro$ weird stats settings

Through the API: POST /ipfs/domains/{id}/stats/detail, id being the gateway domain's id (domain_id in GET /ipfs/stats/settings). It needs a recent second factor from a session, an Idempotency-Key makes a retry safe, and the first time (again whenever the text changes) controller_terms_acknowledged true, having shown the text of GET /legal/acknowledgements (kind stats-detail). A site already on answers changed false and is not charged again.

RefusalMeaning
409 stats-detail-unavailabledetailed statistics are not offered
403 stats-owner-onlyonly the hostname's owner can switch them (access given on a domain does not)
409 acknowledgement-outdatedthe text changed: show the current one (version, text) and confirm again
409 domain-retiredthe hostname is detached
402 insufficient-funds, 402 account-unpaidthe credits do not cover switching on, or the account's storage charges are unpaid: top up, then retry
403 account-suspendedthe account is restricted while a report is reviewed

DELETE /ipfs/domains/{id}/stats/detail switches them off at once: no more visitor data is read and no further hour is charged. It is free and always possible, also while the account is restricted or its storage unpaid. What was collected stays readable and exportable for its usual period.

An API key needs the permission stats:write to switch them, and no wildcard covers it (*, *:write and stats:* do not): tick it by name when you make the key. Reading needs stats:read.

You are the controller of your visitors' data#

Switching detailed statistics on, you ask weird to process your visitors' data on your behalf: you are the controller, weird your processor, under the data processing agreement the acknowledgement names. Say in your own site's privacy notice that you measure visits this way. The acceptance is kept with its text, version and time.

The agreement is published like the terms and the privacy notice: GET /legal/documents/dpa, weird legal show dpa, and the data processing agreement page of weird.ro.

A new version of the agreement. A new version is announced by email and published ahead of the day it takes effect; the application's legal documents page lists it under "Taking effect later", with that day, and you may accept it there before then. Your acceptance of the statistics acknowledgement holds for its text and for the agreement in force when you gave it: once a new agreement has taken effect, switching on asks for the acknowledgement again (an earlier acceptance is refused 409 acknowledgement-outdated, naming dpa_version and the accepted_dpa_version), and the detailed statistics of an account that has not accepted it are paused. GET /ipfs/stats/settings lists those sites under dpa_paused, and the application says they are paused until you accept the new agreement, with the button that accepts it (POST /auth/legal/accept with dpa_version); accepting switches them back on. Nothing collected is deleted and the paused hours are not charged.

Export#

GET /ipfs/stats/export?subject=…&from=…&to=… answers a range as a file: level summary (one row per day) or detail (rows per day, per hour and per list entry, record saying which), format csv (the default; a cell starting with =, +, - or @ gets a leading ', so a spreadsheet never runs it) or json (columns and rows, the values exactly as recorded). The application's Download CSV and Download JSON save the API's answer as it is; from the terminal, weird stats export www.example.ro -o stats.csv.

Charges#

Every successful read of statistics is a storage read:

Credit charge: see the credit charges (contract ipfs.reads per_request)

Each successful read of statistics or an export.

The summary itself is included with storage. Detailed statistics: switching on, then every hour a site has them on, and the requests analysed:

ContractRateWhenTimesCredit charge in force
ipfs.stats-detailed-enableper_requestbefore it runs—see the credit charges
ipfs.stats-detailed-hourlyper_host_hourevery hour while it existssites with detailed statistics onsee the credit charges
ipfs.stats-detailed-hourlyper_million_requestsper use—see the credit charges

When the hours cannot be charged, collection pauses (paused unpaid) and resumes by itself once your credits cover them; the paused hours are never charged, and what was collected stays readable.

Reference#