Tools
Google Analytics
The site's GA4 traffic, once Google is connected. Free.
Things to ask#
Ask your agent in plain words. It picks the tool.
- How many sessions and users did acme.com get last month, by landing page?
- Which traffic sources convert best on acme.com this quarter?
- Which GA4 metrics and dimensions can I use in a report for acme.com?
Tools in Google Analytics#
3 tools. Prices are in credits; 1,000 credits are $1.
| Tool | Use it when | Cost |
|---|---|---|
analytics_list_properties | Before any other analytics_ tool, to find the GA4 property for a site. | Free |
analytics_get_fields | You are unsure which dimension or metric names a GA4 report takes. | Free |
analytics_get_report | You need a site's GA4 traffic: sessions, users, conversions or revenue, by page, source, country, device or date. | Free |
Connect Google first#
These tools read your own Google data, so each brand connects its Google account with Search Console and Analytics access, on the Connect page. Then a call can leave out site_url or property_id and use the ones chosen for the brand; pass brand to pick another site from list_brands. Until Google is connected a call answers 403 forbidden, and the error says where to connect. The tools are free.
List Google Analytics properties#
Tool
Readsanalytics_list_properties- Good for
- Before any other analytics_ tool, to find the GA4 property for a site.
- Not the tool for
- Universal Analytics, which Google shut down. Each brand connects its own Google account with Search Console and Analytics access; the error says where the user does that.
- What you get
- Every GA4 property the brand's Google account can read, with its account, and which one the brand uses.
- Cost
- Free
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
brand | string | No | Which brand: its id or domain from list_brands. Default: the brand this connection is set to, or the organization's only brand. |
Example
{
"name": "analytics_list_properties",
"arguments": {}
}List Analytics fields#
Tool
Readsanalytics_get_fields- Good for
- You are unsure which dimension or metric names a GA4 report takes.
- Not the tool for
- Running the report (use
analytics_get_report). Each brand connects its own Google account with Search Console and Analytics access; the error says where the user does that. - What you get
- The property's dimensions and metrics, each with its API name and display name.
- Cost
- Free
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
brand | string | No | Which brand: its id or domain from list_brands. Default: the brand this connection is set to, or the organization's only brand. |
property_id | string | No | The GA4 property id from analytics_list_properties. Default: the one chosen for the brand. |
Example
{
"name": "analytics_get_fields",
"arguments": {
"property_id": "348201957"
}
}Run an Analytics report#
Tool
Readsanalytics_get_report- Good for
- You need a site's GA4 traffic: sessions, users, conversions or revenue, by page, source, country, device or date.
- Not the tool for
- Google Search data (use
console_get_search_analytics). Each brand connects its own Google account with Search Console and Analytics access; the error says where the user does that. - What you get
- Rows of the metrics asked for, by the dimensions asked for, with totals.
- Cost
- Free
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
brand | string | No | Which brand: its id or domain from list_brands. Default: the brand this connection is set to, or the organization's only brand. |
property_id | string | No | The GA4 property id from analytics_list_properties. Default: the one chosen for the brand. |
metrics | string[] | Yes | GA4 metric names, e.g. sessions, totalUsers, conversions. |
dimensions | string[] | No | GA4 dimension names, e.g. pagePath, sessionSource, country, date. |
start_date | string | No | First day, YYYY-MM-DD. Default: the last 28 days. |
end_date | string | No | Last day, YYYY-MM-DD. Default: the last 28 days. |
order_by | string | No | A metric or dimension to sort by, descending. Default the first metric. |
filter | { dimension, match, value } | No | - |
limit | integer | No | Default 100. |
Example
{
"name": "analytics_get_report",
"arguments": {
"property_id": "348201957",
"metrics": [
"sessions",
"totalUsers"
],
"dimensions": [
"pagePath"
],
"limit": 25
}
}