What it does
Visitor analytics of one site, in UTC days: page views, visitors, visits, bounce rate, average visit length, visitor action events and bot hits (AI crawlers and agents named, kept apart from people), with the previous period of the same length, an hourly or daily chart, and top values for pages, entry and exit pages, referrers, UTM tags, countries, devices, browsers, OS, events and bots. period is today, yesterday, 7d, 30d (default), 90d, 6mo, 12mo or all; or give from and to as YYYY-MM-DD. realtime is the last 5 minutes. access says what the tier allows; a breakdown it does not allow is left out. The owner's own visits are not counted. Today is rolled up every 10 minutes.
Plans
Works on every plan: Free, Basic, Pro and Ultra.
Parameters
| Name | Type | About |
|---|---|---|
site_idrequired | string | The id of the site. list_sites gives the ids of your sites. |
period | one of: today, yesterday, 7d, 30d, 90d, 6mo, 12mo, all | The time range, counted in UTC days. Default 30d. Leave it out when you pass from and to. |
from | string | First day of a custom range, as YYYY-MM-DD. Use it with to. |
to | string | Last day of a custom range, as YYYY-MM-DD. Use it with from. |
limit | integer | How many top values to return for each breakdown, such as pages or referrers. Default 10. |
Example
Call get_site_stats with these arguments:
{
"site_id": "01a1…",
"period": "7d"
}
Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.
Related guides
- Your first siteFrom an empty Hive to a live page in four steps.