Skip to content

Reference

Google Analytics tools

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

Markdown
On this page

Before you begin

Connect the relevant Google Analytics account through Accounts, then connect your AI assistant. 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, workspace access and troubleshooting.

Available tools

2 tools.

ToolAccessPurpose
ga4_list_propertiesReadList all GA4 properties you have access to
ga4_run_reportReadRun 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.

API capabilities

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

Metrics

CategoryFields
UseractiveUsers, newUsers, totalUsers, dauPerMau, dauPerWau, wauPerMau, active1DayUsers, active7DayUsers, active28DayUsers
Sessionsessions, sessionsPerUser, engagedSessions, averageSessionDuration, bounceRate, engagementRate, userEngagementDuration, sessionConversionRate
Page/ScreenscreenPageViews, screenPageViewsPerSession, screenPageViewsPerUser, viewsPerSession
EventeventCount, eventCountPerUser, eventsPerSession, eventValue, firstTimePurchasers
Conversion & Revenueconversions, totalRevenue, purchaseRevenue, totalAdRevenue, ecommercePurchases, itemRevenue, itemsPurchased, purchaserConversionRate, averagePurchaseRevenue, averagePurchaseRevenuePerUser

Dimensions

CategoryFields
Usercountry, city, region, continent, subContinent, userAgeBracket, userGender, language, newVsReturning
SessionsessionSource, sessionMedium, sessionCampaignName, sessionDefaultChannelGroup, sessionSourceMedium, sessionGoogleAdsKeyword, sessionGoogleAdsAdGroupName
Trafficsource, medium, campaignName, defaultChannelGroup, firstUserSource, firstUserMedium, firstUserCampaignName
ContentpagePath, pageTitle, pagePathPlusQueryString, landingPage, exitPage, pageReferrer, contentGroup
TechnologydeviceCategory, operatingSystem, browser, browserVersion, mobileDeviceBranding, mobileDeviceModel, screenResolution, platform, platformDeviceCategory
Timedate, dateHour, dateHourMinute, hour, dayOfWeek, month, year, week, isoWeek, isoYear, isoYearIsoWeek
E-commerceitemName, itemId, itemCategory, itemBrand, transactionId, shippingTier, paymentType

Query examples

User Journey Funnel Analysis

Track user progression through key conversion events

Tool: ga4_run_report.

{
  "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.

{
  "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.

{
  "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.

{
  "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

All tools · Quickstart

Cookies on this site

We use analytics cookies to see how the site is used. They load only if you accept, and you can change your choice at any time. Read our privacy policy.