Fathom Analytics
Use Fathom Analytics API to manage sites, events, milestones, aggregations, and live visitor reporting.
认证方式
| 方式 | 底层类型 | 状态 | 说明 |
|---|---|---|---|
| API Key | api_key | available | — |
调用示例
import { createClient } from "@open-connector/sdk";const oc = createClient({ baseUrl: "https://api.openconnector.dev", apiKey: process.env.OPEN_CONNECTOR_API_KEY!,});const result = await oc.executeTool({ slug: "FATHOM_ANALYTICS_AGGREGATION", connectedAccountId: "conn_...", arguments: { /* match this tool's input schema */ },});import Composio from "@composio/client";const composio = new Composio({ baseURL: "https://api.openconnector.dev/composio", apiKey: process.env.OPEN_CONNECTOR_API_KEY!,});const result = await composio.tools.execute("FATHOM_ANALYTICS_AGGREGATION", { connected_account_id: "conn_...", arguments: { /* match this tool's input schema */ },});oc tools execute FATHOM_ANALYTICS_AGGREGATION --data '{ }'Tool 目录
可用 Tools
21 个可调用操作
AggregationFATHOM_ANALYTICS_AGGREGATIONGenerate an aggregation. This is an incredibly flexible report that allows you to group on any fields you wish, and filter them at your leisure. **Permissions:** Requires read access to the relevant site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** Returns an array of objects. The properties of each object vary based on the aggregates and groupings you've asked for. All numeric values are returned as strings. > This API endpoint is only accurate on data from March 2021 onwards. Before then, we did not tie browser, country, pathname, etc. together, so we have no way to offer this advanced filtering on that data. #### Filtering Filters are supplied as a JSON array. Each filter is an object with a `property`, an `operator` and a string `value`. You can add as many filters as you like; see the examples in the code panel. We support the following operators: - `is` — exact match - `is not` — everything except an exact match - `is like` — contains the term (supports wildcards `*`) - `is not like` — does not contain the term - `matching` — matches a regular expression (regex) pattern - `not matching` — does not match a regex pattern **Operator availability depends on the field.** Text-style fields support all six operators; categorical fields support only `is` and `is not`: - **All six operators:** `domain`, `hostname`, `pathname`, `entry_page`, `exit_page`, `referrer_hostname`, `referrer_pathname`, `referrer_source`, `ref`, `utm_campaign`, `utm_source`, `utm_medium`, `utm_content`, `utm_term` - **`is` / `is not` only:** `device_type`, `operating_system`, `browser`, `country_code`, `city`, `state`, `region` Note: `domain` can be filtered on but not grouped by, while `keyword` can be grouped by but not filtered on. ##### Entry and exit pages `entry_page` is the pathname of the first pageview in a visit. `exit_page` is the pathname of the last pageview before the visitor leaves. Both are session-level fields — they mirror the Entry Pages and Exit Pages reports on your dashboard and work for both `field_grouping` and `filters`. When you filter by `entry_page`, only visits that *entered* on that page are included. A visitor who lands on `/home` and later views `/pricing` is excluded by `{"property": "entry_page", "operator": "is", "value": "/pricing"}`, but included when filtering on `pathname` instead. ##### Regex examples With `matching` / `not matching` you can build sophisticated filters: - `^/(about|contact|pricing)$` — match only /about, /contact and /pricing - `^/(about|contact|pricing)` — match paths starting with those - `^/blog/\d{4}/\d{2}/` — match blog URLs like /blog/2025/07/my-post - `^/products/[^/]+/$` — match product category pages需要连接
Generate an aggregation. This is an incredibly flexible report that allows you to group on any fields you wish, and filter them at your leisure. **Permissions:** Requires read access to the relevant site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** Returns an array of objects. The properties of each object vary based on the aggregates and groupings you've asked for. All numeric values are returned as strings. > This API endpoint is only accurate on data from March 2021 onwards. Before then, we did not tie browser, country, pathname, etc. together, so we have no way to offer this advanced filtering on that data. #### Filtering Filters are supplied as a JSON array. Each filter is an object with a `property`, an `operator` and a string `value`. You can add as many filters as you like; see the examples in the code panel. We support the following operators: - `is` — exact match - `is not` — everything except an exact match - `is like` — contains the term (supports wildcards `*`) - `is not like` — does not contain the term - `matching` — matches a regular expression (regex) pattern - `not matching` — does not match a regex pattern **Operator availability depends on the field.** Text-style fields support all six operators; categorical fields support only `is` and `is not`: - **All six operators:** `domain`, `hostname`, `pathname`, `entry_page`, `exit_page`, `referrer_hostname`, `referrer_pathname`, `referrer_source`, `ref`, `utm_campaign`, `utm_source`, `utm_medium`, `utm_content`, `utm_term` - **`is` / `is not` only:** `device_type`, `operating_system`, `browser`, `country_code`, `city`, `state`, `region` Note: `domain` can be filtered on but not grouped by, while `keyword` can be grouped by but not filtered on. ##### Entry and exit pages `entry_page` is the pathname of the first pageview in a visit. `exit_page` is the pathname of the last pageview before the visitor leaves. Both are session-level fields — they mirror the Entry Pages and Exit Pages reports on your dashboard and work for both `field_grouping` and `filters`. When you filter by `entry_page`, only visits that *entered* on that page are included. A visitor who lands on `/home` and later views `/pricing` is excluded by `{"property": "entry_page", "operator": "is", "value": "/pricing"}`, but included when filtering on `pathname` instead. ##### Regex examples With `matching` / `not matching` you can build sophisticated filters: - `^/(about|contact|pricing)$` — match only /about, /contact and /pricing - `^/(about|contact|pricing)` — match paths starting with those - `^/blog/\d{4}/\d{2}/` — match blog URLs like /blog/2025/07/my-post - `^/products/[^/]+/$` — match product category pages
认证
需要 Connected AccountTags
Create eventFATHOM_ANALYTICS_CREATE_EVENTCreate an event. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** An event object.需要连接
Create an event. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** An event object.
认证
需要 Connected AccountTags
Create milestoneFATHOM_ANALYTICS_CREATE_MILESTONECreate a milestone. Returns HTTP `201 Created` on success. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** A milestone object.需要连接
Create a milestone. Returns HTTP `201 Created` on success. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** A milestone object.
认证
需要 Connected AccountTags
Create siteFATHOM_ANALYTICS_CREATE_SITECreate a site. **Permissions:** Requires full account access (`*`). **Returns:** A site object.需要连接
Create a site. **Permissions:** Requires full account access (`*`). **Returns:** A site object.
认证
需要 Connected AccountTags
Current visitorsFATHOM_ANALYTICS_CURRENT_VISITORSReturns the total number of current visitors on a site. The detailed view also returns the top 150 pages and top 150 referrers. **Permissions:** Requires read access to the site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** The current visitor count, with an optional detailed breakdown.需要连接
Returns the total number of current visitors on a site. The detailed view also returns the top 150 pages and top 150 referrers. **Permissions:** Requires read access to the site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** The current visitor count, with an optional detailed breakdown.
认证
需要 Connected AccountTags
Delete eventFATHOM_ANALYTICS_DELETE_EVENTDelete an event. Careful — you can't undo this, and neither can we. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** Returns a deleted object on success. Otherwise, this call returns an error.需要连接
Delete an event. Careful — you can't undo this, and neither can we. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** Returns a deleted object on success. Otherwise, this call returns an error.
认证
需要 Connected AccountTags
Delete milestoneFATHOM_ANALYTICS_DELETE_MILESTONEDelete a milestone. Careful — you can't undo this, and neither can we. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** Returns a deleted object on success. Otherwise, this call returns an error.需要连接
Delete a milestone. Careful — you can't undo this, and neither can we. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** Returns a deleted object on success. Otherwise, this call returns an error.
认证
需要 Connected AccountTags
Delete siteFATHOM_ANALYTICS_DELETE_SITEDelete a site. Careful — you can't undo this, and neither can we. **Permissions:** Requires full account access (`*`). **Returns:** Returns a deleted object on success. Otherwise, this call returns an error.需要连接
Delete a site. Careful — you can't undo this, and neither can we. **Permissions:** Requires full account access (`*`). **Returns:** Returns a deleted object on success. Otherwise, this call returns an error.
认证
需要 Connected AccountTags
Get accountFATHOM_ANALYTICS_GET_ACCOUNTRetrieve information about the account that owns the API key. **Permissions:** Requires a token with full account access (the `*` scope). **Returns:** An account object.需要连接
Retrieve information about the account that owns the API key. **Permissions:** Requires a token with full account access (the `*` scope). **Returns:** An account object.
认证
需要 Connected AccountTags
Get eventFATHOM_ANALYTICS_GET_EVENTReturn a single event. **Permissions:** Requires read access to the site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** An event object.需要连接
Return a single event. **Permissions:** Requires read access to the site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** An event object.
认证
需要 Connected AccountTags
Get milestoneFATHOM_ANALYTICS_GET_MILESTONEReturn a single milestone. **Permissions:** Requires read access to the site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** A milestone object.需要连接
Return a single milestone. **Permissions:** Requires read access to the site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** A milestone object.
认证
需要 Connected AccountTags
Get siteFATHOM_ANALYTICS_GET_SITEReturn a single site. **Permissions:** Requires read access to the site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** A site object.需要连接
Return a single site. **Permissions:** Requires read access to the site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** A site object.
认证
需要 Connected AccountTags
Get tokenFATHOM_ANALYTICS_GET_TOKENRetrieve metadata about the API token used to make the request, including its name, permissions (abilities), token-format version and timestamps. Your secret token value is never returned. **Permissions:** Any valid API token. **Returns:** A token object.需要连接
Retrieve metadata about the API token used to make the request, including its name, permissions (abilities), token-format version and timestamps. Your secret token value is never returned. **Permissions:** Any valid API token. **Returns:** A token object.
认证
需要 Connected AccountTags
List eventsFATHOM_ANALYTICS_LIST_EVENTSReturn a list of all events this site owns. Events are sorted by `created_at` ascending to allow you to paginate with ease. **Permissions:** Requires read access to the site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** A list of event objects. > The `currency` field is only populated on Create and Update responses; it is returned as `null` on list and get responses.需要连接
Return a list of all events this site owns. Events are sorted by `created_at` ascending to allow you to paginate with ease. **Permissions:** Requires read access to the site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** A list of event objects. > The `currency` field is only populated on Create and Update responses; it is returned as `null` on list and get responses.
认证
需要 Connected AccountTags
List milestonesFATHOM_ANALYTICS_LIST_MILESTONESReturn a list of all milestones this site owns. Milestones are sorted by `created_at` ascending to allow you to paginate with ease. **Permissions:** Requires read access to the site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** A list of milestone objects.需要连接
Return a list of all milestones this site owns. Milestones are sorted by `created_at` ascending to allow you to paginate with ease. **Permissions:** Requires read access to the site (`all-sites-readonly`, `read:{site_id}` or `manage:{site_id}`). **Returns:** A list of milestone objects.
认证
需要 Connected AccountTags
List sitesFATHOM_ANALYTICS_LIST_SITESReturn a list of all sites this API key owns. Sites are sorted by `created_at` ascending to allow you to paginate with ease. **Permissions:** Requires read access to all sites (`all-sites-readonly`) or full account access. **Returns:** A list of site objects.需要连接
Return a list of all sites this API key owns. Sites are sorted by `created_at` ascending to allow you to paginate with ease. **Permissions:** Requires read access to all sites (`all-sites-readonly`) or full account access. **Returns:** A list of site objects.
认证
需要 Connected AccountTags
Update eventFATHOM_ANALYTICS_UPDATE_EVENTUpdate an event. Send only the fields you want to change. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** An event object.需要连接
Update an event. Send only the fields you want to change. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** An event object.
认证
需要 Connected AccountTags
Update milestoneFATHOM_ANALYTICS_UPDATE_MILESTONEUpdate a milestone. Both `name` and `milestone_date` are required. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** A milestone object.需要连接
Update a milestone. Both `name` and `milestone_date` are required. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** A milestone object.
认证
需要 Connected AccountTags
Update siteFATHOM_ANALYTICS_UPDATE_SITEUpdate a site. Send only the fields you want to change. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** A site object.需要连接
Update a site. Send only the fields you want to change. **Permissions:** Requires write access to the site (`manage:{site_id}`). **Returns:** A site object.
认证
需要 Connected AccountTags
Wipe eventFATHOM_ANALYTICS_WIPE_EVENTPreviously wiped all completion data belonging to an event. This endpoint is no longer available.需要连接
Previously wiped all completion data belonging to an event. This endpoint is no longer available.
认证
需要 Connected AccountTags
Wipe siteFATHOM_ANALYTICS_WIPE_SITEPreviously wiped all pageviews and event completions from a website. This endpoint is no longer available.需要连接
Previously wiped all pageviews and event completions from a website. This endpoint is no longer available.
认证
需要 Connected AccountTags