Simple Analytics MCP by usefulapi

v1.28.0
io.usefulapi/simple-analytics Checked 1 day ago Published 12 hours ago

Read Simple Analytics stats: pageviews, visitors, pages, referrers, events and data exports.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

simpleanalytics_list_websites List websites

List the websites of the Simple Analytics account (hostnames to use in the other tools). Good first call. Admin API: GET /api/websites.

simpleanalytics_get_stats Get traffic summary

Aggregated traffic for one website and date range: total pageviews, unique visitors and the median seconds on page. Optional filters narrow it to a page, country, referrer, UTM value, browser, OS, device or metadata value. Stats API: GET /<hostname>.json.

ParameterTypeDescription
hostname *stringWebsite hostname as shown in Simple Analytics, e.g. example.com (from simpleanalytics_list_websites).
browser_namestringOnly this browser name (Chrome).
countrystringOnly this country, 2-letter code (NL).
device_typestringOnly this device type.
endstringEnd date (inclusive): YYYY-MM-DD, today, yesterday or today-1d. Default: today.
metadataobjectExact metadata filters as {key: value}; all must match.
os_namestringOnly this OS name (iOS).
pagestringOnly this page path, e.g. /pricing. A trailing * matches a prefix (/blog/*).
pagesstringOnly these page paths, comma separated (/contact,/product/*).
referrerstringOnly this referrer (normalized, e.g. google.com).
startstringStart date: YYYY-MM-DD, today, yesterday or today-30d. Default: 1 month ago.
timezonestringIANA time zone, e.g. Europe/Amsterdam. Default: the website setting.
utm_campaignstringOnly this UTM campaign.
utm_contentstringOnly this UTM content.
utm_mediumstringOnly this UTM medium.
utm_sourcestringOnly this UTM source.
utm_termstringOnly this UTM term.

simpleanalytics_get_timeseries Get traffic over time

Pageviews and visitors per hour, day, week, month or year for one website and date range (time series for charts and trends). Optional filters as in simpleanalytics_get_stats. Stats API: GET /<hostname>.json?fields=histogram.

ParameterTypeDescription
hostname *stringWebsite hostname as shown in Simple Analytics, e.g. example.com (from simpleanalytics_list_websites).
browser_namestringOnly this browser name (Chrome).
countrystringOnly this country, 2-letter code (NL).
device_typestringOnly this device type.
endstringEnd date (inclusive): YYYY-MM-DD, today, yesterday or today-1d. Default: today.
intervalstringBucket size (default day).
metadataobjectExact metadata filters as {key: value}; all must match.
os_namestringOnly this OS name (iOS).
pagestringOnly this page path, e.g. /pricing. A trailing * matches a prefix (/blog/*).
pagesstringOnly these page paths, comma separated (/contact,/product/*).
referrerstringOnly this referrer (normalized, e.g. google.com).
startstringStart date: YYYY-MM-DD, today, yesterday or today-30d. Default: 1 month ago.
timezonestringIANA time zone, e.g. Europe/Amsterdam. Default: the website setting.
utm_campaignstringOnly this UTM campaign.
utm_contentstringOnly this UTM content.
utm_mediumstringOnly this UTM medium.
utm_sourcestringOnly this UTM source.
utm_termstringOnly this UTM term.

simpleanalytics_get_breakdown Get top pages, referrers, countries or devices

Top values of one dimension for one website and date range, each with pageviews and visitors: pages, countries, referrers, UTM sources/mediums/campaigns/contents/terms, browsers, operating systems or device types. Optional filters as in simpleanalytics_get_stats. Stats API: GET /<hostname>.json?fields=<dimension>.

ParameterTypeDescription
dimension *stringWhat to break the traffic down by.
hostname *stringWebsite hostname as shown in Simple Analytics, e.g. example.com (from simpleanalytics_list_websites).
browser_namestringOnly this browser name (Chrome).
countrystringOnly this country, 2-letter code (NL).
device_typestringOnly this device type.
endstringEnd date (inclusive): YYYY-MM-DD, today, yesterday or today-1d. Default: today.
limitintegerMaximum number of values (default 20, max 1000).
metadataobjectExact metadata filters as {key: value}; all must match.
os_namestringOnly this OS name (iOS).
pagestringOnly this page path, e.g. /pricing. A trailing * matches a prefix (/blog/*).
pagesstringOnly these page paths, comma separated (/contact,/product/*).
referrerstringOnly this referrer (normalized, e.g. google.com).
startstringStart date: YYYY-MM-DD, today, yesterday or today-30d. Default: 1 month ago.
timezonestringIANA time zone, e.g. Europe/Amsterdam. Default: the website setting.
utm_campaignstringOnly this UTM campaign.
utm_contentstringOnly this UTM content.
utm_mediumstringOnly this UTM medium.
utm_sourcestringOnly this UTM source.
utm_termstringOnly this UTM term.

simpleanalytics_get_events Get event counts

How often custom events happened on one website in a date range. Pass event names, or leave names out for all events (up to 1000). Stats API: GET /<hostname>.json?events=...

ParameterTypeDescription
hostname *stringWebsite hostname as shown in Simple Analytics, e.g. example.com (from simpleanalytics_list_websites).
browser_namestringOnly this browser name (Chrome).
countrystringOnly this country, 2-letter code (NL).
device_typestringOnly this device type.
endstringEnd date (inclusive): YYYY-MM-DD, today, yesterday or today-1d. Default: today.
metadataobjectExact metadata filters as {key: value}; all must match.
namesarrayEvent names; default all events.
os_namestringOnly this OS name (iOS).
pagestringOnly this page path, e.g. /pricing. A trailing * matches a prefix (/blog/*).
pagesstringOnly these page paths, comma separated (/contact,/product/*).
referrerstringOnly this referrer (normalized, e.g. google.com).
startstringStart date: YYYY-MM-DD, today, yesterday or today-30d. Default: 1 month ago.
timezonestringIANA time zone, e.g. Europe/Amsterdam. Default: the website setting.
utm_campaignstringOnly this UTM campaign.
utm_contentstringOnly this UTM content.
utm_mediumstringOnly this UTM medium.
utm_sourcestringOnly this UTM source.
utm_termstringOnly this UTM term.

simpleanalytics_export_datapoints Export raw data points

Raw, unsampled page views or events of one website for a date range, as rows with only the fields asked for. The reply is capped at max_rows (default 100, max 1000) rows and 2 MB; "truncated" says more exist, so narrow the range. Rows are cut to about 40 000 characters of JSON. Dates: YYYY-MM-DD, or YYYY-MM-DDTHH for one hour (start and end the same day). Robots are left out unless asked. Needs the user id too. Export API: GET /api/export/datapoints.

ParameterTypeDescription
end *stringEnd date, inclusive.
hostname *stringWebsite hostname as shown in Simple Analytics, e.g. example.com (from simpleanalytics_list_websites).
start *stringStart date (see description).
fieldsarrayFields to export (default added_iso, path, country_code, device_type, document_referrer). All: added_date, added_iso, added_unix, browser_name, browser_version, country_code, datapoint, device_type, d…
include_robotsbooleanInclude robot/crawler traffic (default false).
max_rowsintegerMaximum rows returned (default 100).
timezonestringIANA time zone, e.g. Europe/Amsterdam. Default: the website setting.
typestringPage views (default) or events.