pagehive

get_site_stats

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.

SitesRead-onlyAll plans

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

NameTypeAbout
site_idrequiredstringThe id of the site. list_sites gives the ids of your sites.
periodone of: today, yesterday, 7d, 30d, 90d, 6mo, 12mo, allThe time range, counted in UTC days. Default 30d. Leave it out when you pass from and to.
fromstringFirst day of a custom range, as YYYY-MM-DD. Use it with to.
tostringLast day of a custom range, as YYYY-MM-DD. Use it with from.
limitintegerHow 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