---
title: "Google Analytics - Tools | SnowAI"
description: "Google Analytics tools on SnowAI. The site's GA4 traffic, once Google is connected. Free. 3 tools, each with its parameters, its price and a call to copy."
url: "https://trysnow.ai/docs/tools/analytics"
---

# 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`](https://trysnow.ai/docs/tools/analytics#analytics_list_properties) | Before any other analytics_ tool, to find the GA4 property for a site. | Free |
| [`analytics_get_fields`](https://trysnow.ai/docs/tools/analytics#analytics_get_fields) | You are unsure which dimension or metric names a GA4 report takes. | Free |
| [`analytics_get_report`](https://trysnow.ai/docs/tools/analytics#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](https://trysnow.ai/dashboard/connect#google). 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: `analytics_list_properties` (read-only)

- **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: MCP**

```json
{
  "name": "analytics_list_properties",
  "arguments": {}
}
```

**Example: cURL**

```sh
curl -X POST https://api.trysnow.ai/tools/analytics_list_properties \
  -H "Authorization: Bearer $SNOWAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

**Example: TypeScript**

```ts
const response = await fetch("https://api.trysnow.ai/tools/analytics_list_properties", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SNOWAI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const result = await response.json();
```

**Example: Python**

```python
import os
import requests

response = requests.post(
    "https://api.trysnow.ai/tools/analytics_list_properties",
    headers={"Authorization": f"Bearer {os.environ['SNOWAI_API_KEY']}"},
    json={},
)
print(response.json())
```

## List Analytics fields

Tool: `analytics_get_fields` (read-only)

- **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: MCP**

```json
{
  "name": "analytics_get_fields",
  "arguments": {
    "property_id": "348201957"
  }
}
```

**Example: cURL**

```sh
curl -X POST https://api.trysnow.ai/tools/analytics_get_fields \
  -H "Authorization: Bearer $SNOWAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "property_id": "348201957"
}'
```

**Example: TypeScript**

```ts
const response = await fetch("https://api.trysnow.ai/tools/analytics_get_fields", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SNOWAI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "property_id": "348201957"
  }),
});
const result = await response.json();
```

**Example: Python**

```python
import os
import requests

response = requests.post(
    "https://api.trysnow.ai/tools/analytics_get_fields",
    headers={"Authorization": f"Bearer {os.environ['SNOWAI_API_KEY']}"},
    json={
        "property_id": "348201957",
    },
)
print(response.json())
```

## Run an Analytics report

Tool: `analytics_get_report` (read-only)

- **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: MCP**

```json
{
  "name": "analytics_get_report",
  "arguments": {
    "property_id": "348201957",
    "metrics": [
      "sessions",
      "totalUsers"
    ],
    "dimensions": [
      "pagePath"
    ],
    "limit": 25
  }
}
```

**Example: cURL**

```sh
curl -X POST https://api.trysnow.ai/tools/analytics_get_report \
  -H "Authorization: Bearer $SNOWAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "property_id": "348201957",
  "metrics": [
    "sessions",
    "totalUsers"
  ],
  "dimensions": [
    "pagePath"
  ],
  "limit": 25
}'
```

**Example: TypeScript**

```ts
const response = await fetch("https://api.trysnow.ai/tools/analytics_get_report", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SNOWAI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "property_id": "348201957",
    "metrics": [
      "sessions",
      "totalUsers"
    ],
    "dimensions": [
      "pagePath"
    ],
    "limit": 25
  }),
});
const result = await response.json();
```

**Example: Python**

```python
import os
import requests

response = requests.post(
    "https://api.trysnow.ai/tools/analytics_get_report",
    headers={"Authorization": f"Bearer {os.environ['SNOWAI_API_KEY']}"},
    json={
        "property_id": "348201957",
        "metrics": ["sessions", "totalUsers"],
        "dimensions": ["pagePath"],
        "limit": 25,
    },
)
print(response.json())
```

Every docs page as Markdown: https://trysnow.ai/llms.txt
