All connectors

Google Analytics Data Api

Google Analytics Data Api Connector for AI Agents

Give agents tools for secure, real-time access to fetch, search, write, and sync across every system, with replication, entity mapping, and auth built-in.

20,000+
community members
6,000+
daily active companies
2PB+
synced/month
900+
contributors

About this Connector

Google Analytics 4 (GA4) Data API connector for accessing website and app analytics data. This connector provides access to pre-configured analytics reports including website overview, active users, traffic sources, page performance, device breakdowns, and geographic locations.

CRM

Sales Analytics

Customer Data

web analytics, marketing data, user behavior

Version Information

Package version

0.1.0

Connector version

1.0.1

SDK commit

4047b2be8c79b9f3d50547f54e50c8a4b5cc67d8

Support Open Source

Check us out on Github and join the Airbyte community

Github

Installation & Usage

Get started with the Google Analytics Data Api connector in minutes

1

Install Package

Using uv or pip

bash

Copy
uv pip install airbyte-agent-google-analytics-data-api

2

Import

Initialize and use

python

Copy
from airbyte_agent_google_analytics_data_api import GoogleAnalyticsDataApiConnector
from airbyte_agent_google_analytics_data_api.models import GoogleAnalyticsDataApiAuthConfig

connector = GoogleAnalyticsDataApiConnector(
    auth_config=GoogleAnalyticsDataApiAuthConfig(
        client_id="<OAuth 2.0 Client ID from Google Cloud Console>",
        client_secret="<OAuth 2.0 Client Secret from Google Cloud Console>",
        refresh_token="<OAuth 2.0 Refresh Token for obtaining new access tokens>"
    )
)

3

Tool

Add tools to your agent

python

Copy
@agent.tool_plain # assumes you're using Pydantic AI
@GoogleAnalyticsDataApiConnector.tool_utils
async def google_analytics_data_api_execute(entity: str, action: str, params: dict | None = None):
    return await connector.execute(entity, action, params or {})

Supported Entities & Actions

Access all your Google Analytics Data Api data through a unified API

Lorem ipsum

Lorem ipsum

| Entity | Actions |\n|--------|---------|\n| Website Overview | [List](./REFERENCE.md#website-overview-list), [Search](./REFERENCE.md#website-overview-search) |\n| Daily Active Users | [List](./REFERENCE.md#daily-active-users-list), [Search](./REFERENCE.md#daily-active-users-search) |\n| Weekly Active Users | [List](./REFERENCE.md#weekly-active-users-list), [Search](./REFERENCE.md#weekly-active-users-search) |\n| Four Weekly Active Users | [List](./REFERENCE.md#four-weekly-active-users-list), [Search](./REFERENCE.md#four-weekly-active-users-search) |\n| Traffic Sources | [List](./REFERENCE.md#traffic-sources-list), [Search](./REFERENCE.md#traffic-sources-search) |\n| Pages | [List](./REFERENCE.md#pages-list), [Search](./REFERENCE.md#pages-search) |\n| Devices | [List](./REFERENCE.md#devices-list), [Search](./REFERENCE.md#devices-search) |\n| Locations | [List](./REFERENCE.md#locations-list), [Search](./REFERENCE.md#locations-search) |

Example Prompts

The Google Analytics Data Api connector is optimized to handle prompts like these

Lorem ipsum

Show me the website overview report - List daily active users - Show weekly active user trends - Get the four-weekly active users report - List traffic sources - Show me page performance metrics - Get device breakdown data - List user locations - What are the top traffic sources by sessions? - Which pages have the highest bounce rate? - What devices do most users browse from? - Which countries send the most traffic? - How has daily active users changed over the last month?

Why Airbyte for AI Agents?

Built for production AI workloads with enterprise-grade reliability

Agent-Native Design

Structured, LLM-friendly schemas optimized for AI agent consumption with natural language query support.

Secure Authentication

Built-in OAuth 2.0 handling with automatic token refresh. No hard-coded credentials.

Production Ready

Battle-tested connectors with comprehensive error handling, logging, and retry logic.

Open Source

Fully open source under the MIT license. Contribute, customize, and extend freely.

Works with your favorite frameworks

Use the Google Analytics Data Api connector with any AI agent framework

đŸĻœ

LangChain

đŸĻ™

LlamaIndex

🤖

CrewAI

⚡

AutoGen

🧠

OpenAI Agents SDK

🔮

Claude Agents SDK

Frequently Asked Questions

Didn't find your answer? Please don't hesitate to reach out.

How do I authenticate with Google Analytics Data Api?

The Google Analytics Data API connector supports OAuth 2.0 authentication. You must provide a Client ID, Client Secret, and a Refresh Token obtained from the Google Cloud Console with the Google Analytics read-only scope.

Can I use this connector with any AI agent framework?

The connector is compatible with any Python-based AI agent framework including LangChain, LlamaIndex, CrewAI, Pydantic AI, and custom implementations.

Does this connector support write operations?

No, the Google Analytics Data API connector does not support write operations. It is read-only and focused on retrieving analytics reports. Unsupported operations include creating GA4 properties, deleting analytics data, modifying tracking configurations, and accessing real-time analytics data.

How is this different from the Airbyte data connector?

Agent connectors are specifically designed for AI agents and LLM applications. They provide natural language interfaces, optimized response formats, and seamless integration with agent frameworks, unlike traditional ETL-focused connectors.

Will there be a platform for agent connectors?

The hosted version with secure credential storage through Airbyte Cloud is already available. See the hosted usage section in the documentation for setup instructions.

20,000+
community members
6,000+
daily active companies
2PB+
synced/month
900+
contributors