Agent Connector

Connect your agents to Google Analytics Data API

Production-ready access to your Google Analytics Data API data with managed auth, parametric control, and the reliability your agents need to actually work.

Installation & Usage

Get started with the Google Analytics Data API connector in minutes.

[01]

Install Package

Using uv or pip

BASH

Copy

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

[02]

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

[03]

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

Secure Authentication

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

Agent-Native Design
Heading

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

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 Salesforce connector with any AI agent framework.

LangChain

CrewAI

LlamaIndex

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.

Ready to connect your AI agents to Google Analytics Data API?

Get started in minutes with our open-source connector.