API and MCP

Use Analytics from an AI agent through the Hep.gg MCP server, and the dashboard endpoints behind it.

Analytics is used from the dashboard and through the Hep.gg MCP server. There is no API key for it: the dashboard endpoints below use your signed-in session and are listed for completeness, not for programmatic use.

From an AI agent (MCP)

Connect your agent to the Hep.gg MCP server and it can work with Analytics for you:

ToolWhat it does
hepgg_analytics_sites_listYour sites, visitors online right now, and your site limit
hepgg_analytics_site_createAdd a site and get the tag to paste
hepgg_analytics_stats_summaryVisitors, pageviews, sessions, bounce rate and duration for a period, with the previous period and a series
hepgg_analytics_topTop pages, sources, countries, devices and more for a period
hepgg_analytics_liveVisitors right now and pageviews per minute

Periods are today, 24h, 7d, 30d, 90d, 12m and all (all time is Prime).

Dashboard endpoints

GEThttps://api.hep.gg/v1/analytics/sitesAuth required
List your sites with live counts and your plan limits.

Your sites with the live count, visitors in the last 24 hours and a 7-day series, plus limits (allowed, current, prime).

POSThttps://api.hep.gg/v1/analytics/sitesAuth required
Add a site.
Body
domain
stringrequired
The site's domain, for example example.com.
name
stringoptional
Display name. Defaults to the domain.
timezone
stringoptional
IANA timezone for daily stats, for example America/Toronto. Defaults to UTC.

Returns the site and its install tags. Answers 402 LIMIT_REACHED at your plan's site limit.

GEThttps://api.hep.gg/v1/analytics/sites/{id}/statsAuth required
Everything one dashboard view shows, in one call.
Query
range
stringoptional
today, 24h, 7d, 30d (default), 90d, 12m, all or custom.
from
stringoptional
With custom: first day, YYYY-MM-DD in the site's timezone.
to
stringoptional
With custom: last day.
f_<list>
stringoptional
Filter by a row of any list, for example f_country=CA or f_page=/pricing.

Returns totals, previous (the same period before), series, and lists keyed by page, entry, exit, referrer, referrer_url, channel, country, region, city, device, browser, os, screen, utm_source, utm_medium, utm_campaign and event. On free sites locked names the Prime-only lists.

GEThttps://api.hep.gg/v1/analytics/sites/{id}/liveAuth required
Visitors right now.

Visitors in the last five minutes and pageviews per minute for the last 30 minutes.

GEThttps://api.hep.gg/v1/analytics/sites/{id}/export.csvAuth required
Download your history as CSV.

Prime: daily visitors and pageviews for all time as CSV.