# Google Analytics tools

Source: https://adsuperpowers.ai/docs/tools/google-analytics

Access GA4 website analytics including traffic, events, and user behavior.

## Before you begin

Connect the relevant Google Analytics account through [Accounts](https://adsuperpowers.ai/docs/accounts), then connect your [AI assistant](https://adsuperpowers.ai/docs/setup). Confirm the target account and date range before querying data or making changes.

This is the generated catalog. The tools shown in your AI assistant depend on your connected accounts, active workspace, role, write permissions, enabled features and the client's supported tool surface. A listed tool is not a promise that it is enabled in every workspace. See [accounts](https://adsuperpowers.ai/docs/accounts), [workspace access](https://adsuperpowers.ai/docs/workspaces) and [troubleshooting](https://adsuperpowers.ai/docs/troubleshooting).

## Available tools

2 tools.

| Tool | Access | Purpose |
| --- | --- | --- |
| `ga4_list_properties` | Read | List all GA4 properties you have access to |
| `ga4_run_report` | Read | Run flexible GA4 reports with any metrics and dimensions (page views, users, events, traffic, devices) |

Write tools can change account settings, campaigns or workspace content. Confirm the target and proposed changes before running them.

## Example questions

> Show my GA4 properties

> What are my top traffic sources this week?

> How many active users did we have yesterday?

> What are the most viewed pages on my site?

> Show me user behavior by device type

[More example questions](https://adsuperpowers.ai/docs/examples).

## API capabilities

Available fields and combinations depend on the resource, account and campaign type. Adapt the examples to your selected account.

### Metrics

| Category | Fields |
| --- | --- |
| User | `activeUsers`, `newUsers`, `totalUsers`, `dauPerMau`, `dauPerWau`, `wauPerMau`, `active1DayUsers`, `active7DayUsers`, `active28DayUsers` |
| Session | `sessions`, `sessionsPerUser`, `engagedSessions`, `averageSessionDuration`, `bounceRate`, `engagementRate`, `userEngagementDuration`, `sessionConversionRate` |
| Page/Screen | `screenPageViews`, `screenPageViewsPerSession`, `screenPageViewsPerUser`, `viewsPerSession` |
| Event | `eventCount`, `eventCountPerUser`, `eventsPerSession`, `eventValue`, `firstTimePurchasers` |
| Conversion & Revenue | `conversions`, `totalRevenue`, `purchaseRevenue`, `totalAdRevenue`, `ecommercePurchases`, `itemRevenue`, `itemsPurchased`, `purchaserConversionRate`, `averagePurchaseRevenue`, `averagePurchaseRevenuePerUser` |

### Dimensions

| Category | Fields |
| --- | --- |
| User | `country`, `city`, `region`, `continent`, `subContinent`, `userAgeBracket`, `userGender`, `language`, `newVsReturning` |
| Session | `sessionSource`, `sessionMedium`, `sessionCampaignName`, `sessionDefaultChannelGroup`, `sessionSourceMedium`, `sessionGoogleAdsKeyword`, `sessionGoogleAdsAdGroupName` |
| Traffic | `source`, `medium`, `campaignName`, `defaultChannelGroup`, `firstUserSource`, `firstUserMedium`, `firstUserCampaignName` |
| Content | `pagePath`, `pageTitle`, `pagePathPlusQueryString`, `landingPage`, `exitPage`, `pageReferrer`, `contentGroup` |
| Technology | `deviceCategory`, `operatingSystem`, `browser`, `browserVersion`, `mobileDeviceBranding`, `mobileDeviceModel`, `screenResolution`, `platform`, `platformDeviceCategory` |
| Time | `date`, `dateHour`, `dateHourMinute`, `hour`, `dayOfWeek`, `month`, `year`, `week`, `isoWeek`, `isoYear`, `isoYearIsoWeek` |
| E-commerce | `itemName`, `itemId`, `itemCategory`, `itemBrand`, `transactionId`, `shippingTier`, `paymentType` |

### Query examples

#### User Journey Funnel Analysis

Track user progression through key conversion events

Tool: `ga4_run_report`.

```json
{
  "property_id": "123456789",
  "start_date": "30daysAgo",
  "end_date": "today",
  "metrics": ["activeUsers", "eventCount", "conversions"],
  "dimensions": ["eventName", "pagePath"],
  "dimension_filter": {
    "filter": {
      "fieldName": "eventName",
      "inListFilter": {
        "values": ["page_view", "add_to_cart", "begin_checkout", "purchase"]
      }
    }
  }
}
```

#### Traffic Quality Analysis per Channel

Compare engagement metrics across traffic channels

Tool: `ga4_run_report`.

```json
{
  "property_id": "123456789",
  "start_date": "30daysAgo",
  "end_date": "today",
  "metrics": [
    "sessions", "engagementRate", "averageSessionDuration",
    "conversions", "totalRevenue", "bounceRate"
  ],
  "dimensions": ["sessionDefaultChannelGroup", "sessionSourceMedium"]
}
```

#### Content Performance by Landing Page

Identify top performing landing pages by device

Tool: `ga4_run_report`.

```json
{
  "property_id": "123456789",
  "start_date": "30daysAgo",
  "end_date": "today",
  "metrics": [
    "sessions", "totalUsers", "engagementRate",
    "conversions", "averageSessionDuration"
  ],
  "dimensions": ["landingPage", "deviceCategory"]
}
```

#### Cohort Retention Analysis

Analyze user retention over time by acquisition source

Tool: `ga4_run_report`.

```json
{
  "property_id": "123456789",
  "start_date": "60daysAgo",
  "end_date": "today",
  "metrics": ["activeUsers", "sessions", "totalRevenue"],
  "dimensions": ["firstUserSource", "week", "newVsReturning"]
}
```

## Technical reference

API endpoint: `analyticsdata.googleapis.com/v1beta`. Status: stable.

Production-ready despite the 'early access' label. Admin API uses v1.

### Limitations and notes

- Funnel reports only available via v1alpha (experimental)
- Sampling may occur on large datasets
- Custom dimensions require setup in GA4 interface first

## Other platforms and tools

- [Meta Ads](https://adsuperpowers.ai/docs/tools/meta-ads)
- [Google Ads](https://adsuperpowers.ai/docs/tools/google-ads)
- [Google Search Console](https://adsuperpowers.ai/docs/tools/google-search-console)
- [Google Tag Manager](https://adsuperpowers.ai/docs/tools/google-tag-manager)
- [Google Merchant Center](https://adsuperpowers.ai/docs/tools/google-merchant-center)
- [LinkedIn Ads](https://adsuperpowers.ai/docs/tools/linkedin-ads)
- [TikTok Ads](https://adsuperpowers.ai/docs/tools/tiktok-ads)
- [Workflows](https://adsuperpowers.ai/docs/tools/workflows)
- [Skills](https://adsuperpowers.ai/docs/tools/skills)
- [Clients](https://adsuperpowers.ai/docs/tools/clients)

[All tools](https://adsuperpowers.ai/docs/tools) · [Quickstart](https://adsuperpowers.ai/docs/quickstart)
