MCP Fathom Analytics

get-aggregation

Get aggregated analytics data from Fathom

Input Schema

NameRequiredDescriptionDefault
aggregatesYesComma-separated list of aggregates to include (visits,uniques,pageviews,avg_duration,bounce_rate,conversions,unique_conversions,value)
date_fromYesStart date (e.g., 2025-01-01 00:00:00 or 2025-01-01)
date_groupingNoOptional date grouping
date_toYesEnd date (e.g., 2025-12-31 23:59:59 or 2025-12-31)
entityYesThe entity to aggregate (pageview or event)
entity_idYesID of the entity (site ID or event ID)
field_groupingNoComma-separated fields to group by (e.g., hostname,pathname)
filtersNoArray of filter objects
limitNoLimit on number of results
sort_byNoField to sort by (e.g., pageviews:desc)
timezoneNoTimezone for date calculations (default: UTC)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "aggregates": { "description": "Comma-separated list of aggregates to include (visits,uniques,pageviews,avg_duration,bounce_rate,conversions,unique_conversions,value)", "type": "string" }, "date_from": { "description": "Start date (e.g., 2025-01-01 00:00:00 or 2025-01-01)", "type": "string" }, "date_grouping": { "description": "Optional date grouping", "enum": [ "hour", "day", "month", "year" ], "type": "string" }, "date_to": { "description": "End date (e.g., 2025-12-31 23:59:59 or 2025-12-31)", "type": "string" }, "entity": { "description": "The entity to aggregate (pageview or event)", "enum": [ "pageview", "event" ], "type": "string" }, "entity_id": { "description": "ID of the entity (site ID or event ID)", "type": "string" }, "field_grouping": { "description": "Comma-separated fields to group by (e.g., hostname,pathname)", "type": "string" }, "filters": { "description": "Array of filter objects", "items": { "additionalProperties": false, "properties": { "operator": { "enum": [ "is", "is not", "is like", "is not like" ], "type": "string" }, "property": { "type": "string" }, "value": { "type": "string" } }, "required": [ "property", "operator", "value" ], "type": "object" }, "type": "array" }, "limit": { "description": "Limit on number of results", "exclusiveMinimum": 0, "type": "number" }, "sort_by": { "description": "Field to sort by (e.g., pageviews:desc)", "type": "string" }, "timezone": { "description": "Timezone for date calculations (default: UTC)", "type": "string" } }, "required": [ "entity", "entity_id", "aggregates", "date_from", "date_to" ], "type": "object" }