Skip to content

Analytics

Google Analytics
API integration

Ship Analytics features without building the integration. Full Google Analytics API access via Proxy, normalized data through Unified APIs, and 60+ MCP-ready tools for AI agents — all extensible to your exact use case.

Talk to us
Google Analytics

Use Cases

Why integrate with Google Analytics

Common scenarios for SaaS companies building Google Analytics integrations for their customers.

01

Embed GA4 traffic and conversion reports directly in your product

SaaS platforms can query their customers' GA4 properties to display sessions, page views, conversions, and attribution data natively inside their own UI — eliminating the need for users to context-switch to Google Analytics.

02

Automate GA4 property and data stream provisioning for new customers

Website builders, e-commerce platforms, and agency tools can programmatically create GA4 accounts, properties, and data streams when a user signs up, delivering zero-touch analytics setup without requiring manual GA configuration.

03

Configure conversion events and custom dimensions on behalf of users

SaaS products can automatically define key events and custom dimensions in a customer's GA4 property, ensuring that business-critical actions tracked by the SaaS platform are properly registered as official KPIs in Google Analytics.

04

Extract behavioral audience segments for activation in your platform

Marketing automation tools and CDPs can create and query GA4 audience exports to pull user segments like cart abandoners or high-intent visitors, then trigger campaigns or workflows based on those cohorts.

05

Build cross-platform analytics dashboards with normalized GA4 data

Reporting and BI tools can pull GA4 metrics alongside data from other integrations, presenting a unified view of marketing performance, attribution, and ROI without requiring customers to manually export data.

What You Can Build

Ship these features with Truto + Google Analytics

Concrete product features your team can ship faster by leveraging Truto’s Google Analytics integration instead of building from scratch.

01

Embedded website traffic dashboard

Use the GA4 Data API to run reports and display real-time and historical traffic, source/medium breakdowns, and conversion metrics directly inside your product's UI.

02

One-click GA4 property setup for new sites

Automatically provision a GA4 account, property, and web data stream when a user creates a new website or store, and inject the tracking snippet without any manual steps.

03

Automated key event and custom dimension configuration

Programmatically create key events and custom dimensions in a customer's GA4 property to ensure your platform's actions are tracked as conversions and enriched with custom metadata.

04

Audience export pipeline for retargeting workflows

Trigger audience exports from GA4, query the resulting user lists, and feed those segments into your email, SMS, or ad campaign automation engine.

05

GA4 account and property management console

Let users browse, update, and manage their GA4 accounts, properties, data streams, and linked services (Firebase, Google Ads) from within your application.

06

Real-time activity feed powered by GA4

Query the GA4 realtime reporting endpoint to show a live view of active users, top pages, and event counts as they happen on your customer's site.

SuperAI

Google Analytics AI agent tools

Comprehensive AI agent toolset with fine-grained control. Integrates with MCP clients like Cursor and Claude, or frameworks like LangChain.

list_all_googleanalytics_accounts

Use this endpoint to retrieve a list of all Google Analytics accounts to which the authenticated user has access.

list_all_googleanalytics_account_user

Use this endpoint to retrieve all user links (permissions) for a specific Google Analytics account.

list_all_googleanalytics_accounts_alpha

Get all accounts accessible by the caller in Google Analytics. Returns accounts array with account details excluding soft-deleted accounts by default.

list_all_googleanalytics_account_access_bindings_alpha

This method retrieves information about a specific access binding on a Google Analytics account. An access binding defines the access level (permissions/roles) a user or group has on an account.

list_all_googleanalytics_account_summaries

Get summaries of all accounts accessible by the caller in Google Analytics. Returns account summaries including account name, account resource name, display name, and child property summaries with property resource name, display name, property type, and parent resource name.

list_all_googleanalytics_accounts_beta

Get all accounts accessible by the caller in Google Analytics. Returns accounts excluding soft-deleted ones by default. Response includes accounts array with account details.

get_single_googleanalytics_accounts_beta_by_id

Get information about a specific account in Google Analytics. Requires id. Returns the Account resource with details about the account.

update_a_googleanalytics_accounts_beta_by_id

Update fields of a specific account in Google Analytics using id and updateMask. Returns the updated account resource with its name field.

delete_a_googleanalytics_accounts_beta_by_id

Delete (soft-delete) an account by id in Google Analytics. Marks the account as trashed and returns an empty response. Note: soft-deleted accounts can only be restored via the Trash Can UI and will be permanently purged after expiration.

googleanalytics_accounts_beta_data_sharing_settings

Get data sharing settings for an account in Google Analytics. Requires id. Returns fields including sharingWithGoogleSupportEnabled, sharingWithGoogleAssignedSalesEnabled, sharingWithGoogleProductsEnabled, and sharingWithOthersEnabled indicating data sharing preferences.

googleanalytics_accounts_beta_provision

Create an account ticket in Google Analytics by providing account details and redirectUri. Returns accountTicketId for Terms of Service link.

googleanalytics_accounts_beta_access_report

Run a customized data access report for the specified entity in Google Analytics. Requires entity parameter. Returns records of user data access including dimensions and metrics for up to 2 years.

googleanalytics_accounts_beta_search_change_history

Search change history events for an account in Google Analytics using account. Returns change event id, change time, actor type, user email, filtered changes flag, and list of changes.

list_all_googleanalytics_properties

List child Properties filtered by filter in Google Analytics. Returns properties accessible to the caller excluding soft-deleted ones by default. Response includes properties array with property details.

get_single_googleanalytics_property_by_id

Get a single Google Analytics property by id. Returns the property resource with details such as property name and settings.

create_a_googleanalytics_property

Create a Google Analytics property with specified location and attributes. Returns the created property including its resource name, display name, and industry category.

update_a_googleanalytics_property_by_id

Update a property by id in Google Analytics. Requires updateMask specifying fields to update. Returns the updated property resource.

delete_a_googleanalytics_property_by_id

Delete a Property by id in Google Analytics. Marks the Property as soft-deleted (trashed) and returns it. Note: Properties cannot be restored via API and will be permanently purged if not restored before expiration.

list_all_googleanalytics_custom_dimensions

List CustomDimensions on a property in Google Analytics. Requires parent property in the format properties/{property_id}. Returns customDimensions array with details of each custom dimension.

get_single_googleanalytics_custom_dimension_by_id

Get a single CustomDimension by id and property_id in Google Analytics. Returns the CustomDimension resource with its configuration details.

create_a_googleanalytics_custom_dimension

Create a CustomDimension for the property specified by parent in Google Analytics. Returns the created CustomDimension resource.

update_a_googleanalytics_custom_dimension_by_id

Update a CustomDimension on a property in Google Analytics. Requires property and id. Returns the updated CustomDimension resource including its resource name and configuration fields.

googleanalytics_custom_dimensions_archive

Archive a CustomDimension identified by id on a property identified by property_id in Google Analytics. The response is an empty JSON object.

list_all_googleanalytics_custom_metrics

List CustomMetrics for a property in Google Analytics. Requires parent property identifier. Returns an array of CustomMetric objects representing the custom metrics defined for the property.

get_single_googleanalytics_custom_metric_by_id

Get a single CustomMetric by property_id and id in Google Analytics. Returns the CustomMetric resource with its configuration details.

create_a_googleanalytics_custom_metric

Create a CustomMetric for the property specified by parent in Google Analytics. Returns the created CustomMetric resource including name, parameterName, displayName, description, measurementUnit, scope, and restrictedMetricType fields.

update_a_googleanalytics_custom_metric_by_id

Update a CustomMetric on a property in Google Analytics. Requires customMetric name as properties/{property}/customMetrics/{customMetric} and updateMask specifying fields to update. Returns the updated CustomMetric resource.

googleanalytics_custom_metrics_archive

Archive a CustomMetric by property_id and id in Google Analytics. Returns an empty response body on success.

list_all_googleanalytics_data_streams

List DataStreams for a property using parent. Returns dataStreams array with DataStream objects and nextPageToken for pagination in Google Analytics.

get_single_googleanalytics_data_stream_by_id

Get a single DataStream by property_id and id in Google Analytics. Returns the DataStream resource with details such as name, type, and configuration.

create_a_googleanalytics_data_stream

Create a DataStream for the property specified by parent. Returns the created DataStream resource including name, type, displayName, createTime, updateTime, and stream-specific data.

update_a_googleanalytics_data_stream_by_id

Update a DataStream on a property in Google Analytics. Requires property_id and id. Returns the updated DataStream resource including name, type, displayName, createTime, updateTime, and stream-specific data such as webStreamData, androidAppStreamData, or iosAppStreamData.

delete_a_googleanalytics_data_stream_by_id

Delete a DataStream by property_id and id in Google Analytics. Returns an empty response body on success.

list_all_googleanalytics_measurement_protocol_secrets

List MeasurementProtocolSecrets for the parent stream specified by property and data_stream in Google Analytics. Returns measurementProtocolSecrets array containing secret details.

get_single_googleanalytics_measurement_protocol_secret_by_id

Get a single MeasurementProtocolSecret by property, data_stream, and id in Google Analytics. Returns the MeasurementProtocolSecret resource with its details.

create_a_googleanalytics_measurement_protocol_secret

Create a measurement protocol secret for the specified property and data_stream in Google Analytics. Returns the created secret's name, displayName, and secretValue.

update_a_googleanalytics_measurement_protocol_secret_by_id

Update a measurement protocol secret identified by id under the specified property and data_stream in Google Analytics. Returns the updated secret resource.

delete_a_googleanalytics_measurement_protocol_secret_by_id

Delete a MeasurementProtocolSecret by property, data_stream, and id in Google Analytics. Returns an empty response on success.

list_all_googleanalytics_firebase_links

List FirebaseLinks for a property in Google Analytics. Requires property_id. Returns firebaseLinks array with at most one FirebaseLink object.

create_a_googleanalytics_firebase_link

Create a FirebaseLink for the property specified by parent in Google Analytics. Returns the created FirebaseLink including name, project resource name, and creation time.

delete_a_googleanalytics_firebase_link_by_id

Delete a FirebaseLink for a property in Google Analytics. Requires property_id and id. Returns an empty JSON object on success.

list_all_googleanalytics_google_ads_links

List GoogleAdsLinks for a property using parent. Returns googleAdsLinks array with details of each link.

create_a_googleanalytics_google_ads_link

Create a GoogleAdsLink for the property specified by parent. Returns the created GoogleAdsLink resource.

update_a_googleanalytics_google_ads_link_by_id

Update a GoogleAdsLink on a property in Google Analytics using id and property_id. Returns the updated GoogleAdsLink including fields name, customerId, canManageClients, adsPersonalizationEnabled, createTime, updateTime, and creatorEmailAddress.

delete_a_googleanalytics_google_ads_link_by_id

Delete a GoogleAdsLink by property_id and id in Google Analytics. Returns an empty response on success.

list_all_googleanalytics_key_events

Get a list of Key Events for the specified parent property in Google Analytics. Returns keyEvents array with details of each event. Requires parent property resource name.

get_single_googleanalytics_key_event_by_id

Get a single Key Event by property and id in Google Analytics. Returns the Key Event resource with details about the event.

create_a_googleanalytics_key_event

Create a Key Event in Google Analytics property specified by parent. Returns the created Key Event resource including name, eventName, createTime, deletable, custom, countingMethod, and defaultValue fields.

update_a_googleanalytics_key_event_by_id

Update a Key Event by property and id in Google Analytics. Requires updateMask specifying fields to update. Returns the updated Key Event including name, eventName, createTime, deletable, custom, countingMethod, and defaultValue.

delete_a_googleanalytics_key_event_by_id

Delete a Key Event by property and id in Google Analytics. Returns an empty response on success.

googleanalytics_pivot_reports_batch_run

Run multiple pivot reports for the same Google Analytics property using property. Returns pivotReports array with each report's data including dimensions, metrics, and pivots.

googleanalytics_pivot_reports_run

Run a customized pivot report for a Google Analytics property using property. Returns pivot report data including dimensions, metrics, and pivots as specified in the request.

googleanalytics_reports_batch_run

Run multiple reports for the same Google Analytics property using batchRunReports in Google Analytics. Requires property. Returns reports array with each report containing requested dimensions, metrics, and date ranges.

googleanalytics_reports_run

Run a customized report of Google Analytics event data for property using specified dimensions, metrics, and dateRanges. Returns rows with dimension values and metric values.

googleanalytics_compatibility_check

Check compatibility of dimensions and metrics for a Google Analytics property using property. Returns dimensionCompatibilities and metricCompatibilities indicating if each dimension and metric can be added to a Core report.

list_all_googleanalytics_metadata

Get metadata for dimensions, metrics, and comparisons for a Google Analytics property using id. Returns resource name, dimension descriptions, metric descriptions, and comparison descriptions.

googleanalytics_realtime_report_run

Run a realtime report for the Google Analytics property specified by property. Returns dimensionHeaders describing dimension columns, metricHeaders describing metric columns, and rows of dimension value combinations and metric values.

list_all_googleanalytics_audience_exports

List all audience exports for a property in Google Analytics. Requires parent property in format properties/{property}. Returns audienceExports array with details of each audience export.

get_single_googleanalytics_audience_export_by_id

Get configuration metadata about a specific audience export in Google Analytics. Requires property and id. Returns fields describing the audience export configuration.

create_a_googleanalytics_audience_export

Create an audience export for the property specified by parent in Google Analytics. Returns the audience export's resource name and initiates an asynchronous request to form the export.

googleanalytics_audience_exports_query

Get users in an audience export for property and id in Google Analytics. Returns audienceRows with user dimension values, audienceExport configuration, and total rowCount.

googleanalytics_user_deletion_request_upsert

Insert or update a user deletion request in Google Analytics. Returns the user deletion request resource including id (type and userId), propertyId, webPropertyId, and deletionRequestTime indicating when the request was received.

get_single_googleanalytics_data_retention_setting_by_id

Get the singleton data retention settings for a property in Google Analytics. Requires property id. Returns dataRetentionSettings including retention duration and reset conditions.

update_a_googleanalytics_data_retention_setting_by_id

Get data retention settings for a property in Google Analytics. Requires property. Returns eventDataRetention (event-level data retention duration), userDataRetention (user-level data retention duration), and resetUserDataOnNewActivity (boolean to reset retention on new user activity).

Why Truto

Why use Truto’s MCP server for Google Analytics

Other MCP servers give you a static tool list for one app. Truto gives you a managed, multi-tenant MCP infrastructure across 650+ integrations.

01

Auto-generated, always up to date

Tools are dynamically generated from curated documentation — not hand-coded. As integrations evolve, tools stay current without manual maintenance.

02

Fine-grained access control

Scope each MCP server to read-only, write-only, specific methods, or tagged tool groups. Expose only what your AI agent needs — nothing more.

03

Multi-tenant by design

Each MCP server is scoped to a single connected account with its own credentials. The URL itself is the auth token — no shared secrets, no credential leaking across tenants.

04

Works with every MCP client

Standard JSON-RPC 2.0 protocol. Paste the URL into Claude, ChatGPT, Cursor, or any MCP-compatible agent framework — tools are discovered automatically.

05

Built-in auth, rate limits, and error handling

Tool calls execute through Truto’s proxy layer with automatic OAuth refresh, rate-limit handling, and normalized error responses. No raw API plumbing in your agent.

06

Expiring and auditable servers

Create time-limited MCP servers for contractors or automated workflows. Optional dual-auth requires both the URL and a Truto API token for high-security environments.

Unified APIs

Unified APIs for Google Analytics

Skip writing code for every integration. Use Truto’s category-specific Unified APIs out of the box or customize the mappings with AI.

Unified User Directory API

Users

The User object represents a User.

View Docs

How It Works

From zero to integrated

Go live with Google Analytics in under an hour. No boilerplate, no maintenance burden.

01

Link your customer’s Google Analytics account

Use Truto’s frontend SDK to connect your customer’s Google Analytics account. We handle all OAuth and API key flows — you don’t need to create the OAuth app.

02

We handle authentication

Don’t spend time refreshing access tokens or figuring out secure storage. We handle it and inject credentials into every API request.

03

Call our API, we call Google Analytics

Truto’s Proxy API is a 1-to-1 mapping of the Google Analytics API. You call us, we call Google Analytics, and pass the response back in the same cycle.

04

Unified response format

Every response follows a single format across all integrations. We translate Google Analytics’s pagination into unified cursor-based pagination. Data is always in the result attribute.

FAQs

Common questions about Google Analytics on Truto

Authentication, rate limits, data freshness, and everything else you need to know before you integrate.

What authentication method does the Google Analytics integration use?

Truto handles OAuth 2.0 authentication with Google on your behalf. Your end users authorize access to their GA4 accounts through a standard OAuth consent flow, and Truto manages token refresh and storage automatically.

Can I run custom reports with arbitrary metric and dimension combinations?

Yes. The integration supports running reports and pivot reports via the GA4 Data API, including batch runs. You can also use the compatibility check endpoint to verify that specific metric/dimension combinations are valid before querying, and the metadata endpoint to discover all available fields.

Does the integration support both reading and writing to GA4?

Yes. You can read data via reporting endpoints (standard reports, realtime reports, audience exports) and manage GA4 configuration by creating, updating, and deleting properties, data streams, custom dimensions, custom metrics, key events, measurement protocol secrets, and linked services.

How does Truto handle pagination for GA4 list endpoints?

Truto automatically handles pagination across all list endpoints — accounts, properties, data streams, custom dimensions, and more — so you receive complete result sets without managing page tokens yourself.

Can I provision entirely new GA4 accounts programmatically?

Yes. The integration includes the account provisioning endpoint, which allows you to create new GA4 accounts. You can then chain this with property creation and data stream creation to fully automate analytics setup for your users.

Is there a Unified API available for Google Analytics?

Google Analytics is mapped to Truto's Unified User Directory API for user-related operations. For analytics-specific workflows like reporting, property management, and event configuration, you use the Google Analytics-specific proxy endpoints which give you full access to the GA4 Admin and Data APIs.

Google Analytics

Get Google Analytics integrated into your app

Our team understands what it takes to make a Google Analytics integration successful. A short, crisp 30 minute call with folks who understand the problem.

Talk to us