Major

Google Analytics AI: API, Agents and Workflow Automation

Understand Google Analytics AI, verified GA4 API methods and the native Major connector. Build reporting apps with durable evidence, agent judgment and human approval.

Ritvij GautamUpdated
Major x Google Analytics logo lockup

Google Analytics AI includes native insights, predictive metrics and Ask Advisor for understanding website and app performance. This guide explains those features, the GA4 API, and how Major turns reporting into governed cross-system work with deterministic apps, judgment from agents and approval workflows.

What Google Analytics measures and who uses it

Google Analytics organizes website and app measurement into properties, events, dimensions and metrics. Its Data API exposes aggregate reports for custom dashboards, recurring reporting and integration with business systems. It does not support legacy Universal Analytics properties.

Marketing operations teams use campaign and acquisition reports to understand which traffic sources bring engaged visitors and key events. Ecommerce analysts examine purchases and revenue. Product analysts compare usage across devices, countries and app experiences, while measurement specialists maintain the definitions that make those comparisons meaningful.

The practical problem is usually the handoff after someone sees a change. A marketer needs campaign ownership, launch context and a place to review the explanation, not another exported spreadsheet.

Major supplies that operational layer. An agent can build the deterministic app that stores campaign mappings, computes comparisons and holds review history, then run that software on later reporting cycles. The agent reserves judgment for interpreting an exception, weighing conflicting evidence and drafting what the owner should investigate.

Google Analytics AI: native features and their boundaries

Google's Analytics Intelligence documentation distinguishes automated insights from custom insights. Automated insights detect unusual changes and emerging trends. Custom insights evaluate conditions you configure, with optional email notifications. These are useful starting points when the question stays inside Analytics.

Predictive metrics include purchase probability, churn probability and predicted revenue. Eligibility depends on sufficient training examples and sustained model quality. Predictions can become unavailable when quality falls below Google's threshold, so a workflow must not assume every property or user has them.

Ask Advisor answers natural-language questions and supports diagnostic follow-ups with narrative and structured responses. Google also documents programmatic access in its alpha API. Treat that as an optional capability with separate authorization, not something automatically exposed by every connector operation.

Major adds the surrounding business context: which HubSpot campaign owns the traffic, whether a launch changed the page, who approves the proposed response and what happened last time. Native analysis remains valuable. The Major agent judges how that evidence affects an operational decision, while the app retains the evidence and workflow handles execution.

How Google Analytics connects to Major

Major has a native Google Analytics connector, identified as googleanalytics in its connector catalog. IT sets it up once and scopes access to the properties and operations the team needs. Credentials stay centrally managed in the connector vault, never copied into app code or agent prompts.

The Google API quickstart documents user-account and service-account authentication and the requirement to enable the Data API in a Google Cloud project. That describes Google's access model, not a promise that every credential flow or alpha method is available through the native connector.

Confirm the connector's available operations before designing a build around them. The endpoint guide below explains the vendor API surface; it is not an inventory of connector actions. A team can begin with historical reporting without granting administrative access or enabling conversational analysis.

Major orchestrates Google Analytics; it never replaces it. Analytics remains the measurement system. A Major app holds operational state, the agent interprets context through scoped connectors, and the workflow schedules retrieval and approvals. SSO, RBAC and audit logs cover the apps, agents and workflows that use those connections.

Google Analytics API guide for builders

The reporting service uses the base URL https://analyticsdata.googleapis.com. The paths below preserve Google's documented HTTP transcoding syntax. They describe beta reporting methods, not an administrative API for changing property configuration.

Authentication, pagination and testing

The reporting reference accepts https://www.googleapis.com/auth/analytics.readonly or the broader analytics scope. Prefer read-only access plus permission on the target property. Ask Advisor instead requires https://www.googleapis.com/auth/analytics.chatbot.read. Do not assume reporting consent authorizes it.

Historical reports use offset and limit, not a cursor or Link header. The runReport reference documents 10,000 rows by default and a 250,000-row maximum per request. Store the requested ordering and page progress with each run.

Google offers a demo account, but explicitly prohibits using it with the Data API. No dedicated reporting API sandbox is documented in the pages reviewed. Use a property you control and recorded fixtures for integration tests.

Quotas and events

For standard properties, Core quotas include 200,000 tokens per property daily, 40,000 hourly, 14,000 per project per property hourly and 10 concurrent requests. These are API quota tokens, not a Major model-token allowance. Realtime has a separate quota category.

Request returnPropertyQuota and inspect the returned propertyQuota balances. Google's quota guide does not document a reporting rate-limit response header to monitor instead. Reduce query size, control concurrency and use bounded exponential backoff for quota or transient server failures.

There is no documented campaign-anomaly webhook for these reporting methods. Separate alpha audience-list webhooks notify creation status: CREATING, then ACTIVE or FAILED. They support an optional X-Goog-Channel-Token shared value and a sent timestamp for replay detection, not a documented HMAC signature. The guide requires an initial successful response within five seconds; a delivery retry schedule is not documented publicly there.

POST /v1beta/{property=properties/*}:runReport

Returns historical aggregate event data for requested dimensions, metrics, filters and dates.

  • App: Save daily campaign observations with their query definition.
  • Agent: Interpret a conversion decline alongside campaign context.
  • Workflow: Retrieve the closed reporting window and persist every page before comparison.

POST /v1beta/{property=properties/*}:batchRunReports

Groups up to five reports for one property in a request, reducing HTTP round trips rather than eliminating quota consumption.

  • App: Assemble a review screen from channel and device breakdowns.
  • Agent: Compare evidence across those breakdowns before drafting a hypothesis.
  • Workflow: Group related report requests and track their completion.

GET /v1beta/{name=properties/*/metadata}

Returns available reporting dimensions and metrics, including property-specific custom definitions.

  • App: Populate a validated metric selector rather than accept arbitrary names.
  • Agent: Understand what the property's available measurements actually mean.
  • Workflow: Refresh metadata and flag changes that affect saved reports.

POST /v1beta/{property=properties/*}:checkCompatibility

Identifies dimensions and metrics compatible with the proposed report.

  • App: Display validation feedback before saving a report configuration.
  • Agent: Choose a supported alternative when a requested comparison is invalid.
  • Workflow: Validate changed report definitions before scheduled execution.

POST /v1beta/{property=properties/*}:runRealtimeReport

Returns recent activity, with a documented window of 30 minutes for standard properties and up to 60 minutes for Analytics 360.

  • App: Show a timestamped launch-health snapshot.
  • Agent: Assess whether current activity warrants investigation, without declaring historical impact.
  • Workflow: Run a short, bounded monitoring window after a launch.

POST /v1beta/{property=properties/*}:runPivotReport

Returns a pivot report with configured dimension groupings and visible rows or columns.

  • App: Present a reusable device-by-channel investigation view.
  • Agent: Judge whether a decline is concentrated in one segment.
  • Workflow: Refresh the approved pivot definition for review.

POST /v1beta/{property=properties/*}:batchRunPivotReports

Runs multiple pivot reports for the same property, with up to five reports per batch.

  • App: Store comparable segmented views in one investigation record.
  • Agent: Synthesize several views into a concise explanation with uncertainty.
  • Workflow: Group the requests and retain each report's configuration and result.

Google Analytics automation use cases on Major

Start with a process owner and a decision, not a broad request to analyze everything. The following designs combine GA4 with another business system while keeping aggregate measurement separate from contact identity.

Campaign anomaly review with HubSpot

  • App: Holds the campaign-to-UTM crosswalk, observations, baselines and review queue.
  • Agent: Judges whether an exception looks like changed traffic mix, measurement drift or an unresolved performance problem.
  • Workflow: Schedules retrieval, routes the draft and delivers only after approval.
  • API operations: The linked runReport and batchRunReports methods above supply historical evidence. Metadata and compatibility checks validate the saved report.

This follows the published campaign-anomaly use case. Delivery should use a verified destination, not an assumed ability to attach a CRM note directly to a marketing campaign.

Email campaign follow-up with Mailchimp

  • App: Maps campaign UTMs to GA4 observations and stores send dates and report status.
  • Agent: Interprets email engagement alongside website key events without treating clicks and sessions as identical populations.
  • Workflow: Waits 48 hours after a send, retrieves the evidence and requests owner review.
  • API operations: runReport supplies the historical comparison; checkCompatibility validates its dimensions.

This is a proposed build grounded in the queued email-reporting use case, not an already published implementation guide.

Launch investigation with Slack

  • App: Keeps launch timestamps, monitoring windows, report snapshots and investigation status.
  • Agent: Weighs recent activity against the launch context and drafts questions for the owner.
  • Workflow: Retrieves bounded realtime snapshots, then follows up with historical reporting and routes any proposed escalation.
  • API operations: runRealtimeReport supplies the immediate check; runReport and runPivotReport support later analysis.

Keep early observations labeled provisional. Realtime reporting is not a substitute for the same historical query used in a daily baseline.

Architecture: build the reporting control surface on Major

Google Analytics and HubSpot feed a Major workflow, agent and review app

Figure 1. Reporting evidence flows through validation, judgment and a durable review queue.

Build the reusable software first. A Campaign Watch app needs managed tables for approved mappings, report definitions, snapshots, investigations and approvals. Each snapshot should identify the property, reporting window, query version and fetch time so a reviewer can reproduce the comparison.

  1. Connect: IT authorizes the native Google Analytics connector and the required campaign-context connector.
  2. Build the app: Store mappings and evidence, calculate fixed comparisons in code, and expose a permissioned review queue.
  3. Configure the agent: Give it scoped access to flagged evidence and ask for an interpretation, uncertainty and recommended checks.
  4. Configure the workflow: Schedule retrieval, validate completeness, invoke judgment when needed and pause before consequential delivery.
  5. Test the boundary: Verify that a missing report cannot become a zero and that an unapproved proposal cannot reach an external destination.

The workflow box in the diagram represents deterministic orchestration. It is separate from the agent's judgment and the app's state. Once the agent has built the repeatable retrieval and comparison software, later runs execute it rather than asking a model to reconstruct the process.

A worked example with explicit assumptions

For example, a marketing operations team reviews 20 campaign observations each weekday. Assume a manual check takes six minutes per campaign to gather the report, find the owner and write a short note. That is 20 × 6 = 120 minutes daily, or 600 minutes across five weekdays.

In an illustrative Major design, the workflow retrieves all 20 observations and code applies the agreed minimum-volume and comparison rules. Four observations enter the review queue. If each takes four minutes to review, and a daily completeness check takes another 10 minutes, human handling becomes 4 × 4 + 10 = 26 minutes daily.

The arithmetic difference is 120 minus 26 = 94 minutes per day, or 470 minutes per five-day week. This is a planning example, not a customer result or a measured Major performance claim. It excludes setup, maintenance and incident handling.

Suppose one campaign falls from a comparable 1,000 sessions and 40 key events to 1,000 sessions and 20 key events. The rate changes from 4% to 2%. The agent may prioritize a device-specific investigation, but those counts alone do not establish causality or statistical significance. The owner reviews the supporting breakdown before approving a brief.

Governance and failure handling before production

Google Analytics evidence goes to a Major agent, then routine archival or human approval

Figure 2. Routine read-only results can be archived; consequential actions require approval.

Separate permission to read evidence from permission to act. A reporting agent must never independently change ad budgets, rewrite campaign mappings, export user identifiers or alter measurement settings. An approval should name the destination and exact action, with a fresh check if the underlying evidence changes.

Use an idempotency key based on property, reporting window, query version and campaign mapping. A rerun updates the existing snapshot rather than adding a second observation. Track approved deliveries separately so a retry cannot send the same brief twice.

Follow Google's quota guidance: bound concurrency and apply capped exponential backoff. Repeated authorization failures require operator attention, not repeated attempts. A failed or incomplete pull stays missing, never zero.

Preserve timezone, query filters, identity assumptions and freshness with each observation. Aggregate reports can still expose sensitive business information, so restrict evidence access through RBAC and retain only what the process needs. Audit the report version, agent assessment, reviewer edits, approval and delivery result. If using audience-list notifications, validate the channel token, reject replays and reconcile status when a notification is absent.

Google Analytics AI Apps, Agents and Workflow Automations

Every published Major use case that works with Google Analytics, newest first. Each one names the Google Analytics API objects involved and shows the app, agent and workflow split.

Frequently asked questions

Does Google Analytics have AI built in?

Yes. Analytics Intelligence supplies automated insights, eligible properties can use predictive metrics, and Ask Advisor answers natural-language analytics questions. Custom insights also support configured conditions. Major adds cross-system investigation, durable review state and approval routing.

Can I automate Google Analytics reporting with Major?

Yes. Major has a native Google Analytics connector. Schedule report retrieval, store snapshots and campaign mappings in an app, invoke an agent for interpretation, and route consequential actions through a workflow approval.

What permissions does a Google Analytics AI agent need?

Standard Data API reporting supports the analytics.readonly OAuth scope, together with property access for the calling identity. Ask Advisor uses the separate analytics.chatbot.read scope. Grant only the permissions required by the selected operation.

Does GA4 send webhooks when campaign performance drops?

The reporting methods covered here do not document a campaign-performance webhook. Use scheduled reporting. Separate v1alpha audience-list webhooks report export creation status, not conversion anomalies.

Can I test the Data API against Google's demo account?

No. Google explicitly excludes the demo account from Analytics Data API access. Use a separate property you control for API integration tests and stored fixtures for repeatable failure tests.

Why do GA4 and marketing-platform numbers disagree?

Attribution, reporting identity, consent coverage, timezone boundaries, UTM mapping and reporting freshness can differ. Preserve those settings with each snapshot and investigate mismatches before treating them as campaign performance changes.

Sources

The official Google pages below support the product and API details in this guide. The endpoint references establish the exact HTTP methods and paths, accepted reporting scopes and request structures. The quota guide establishes property-level limits and the response fields used to monitor remaining capacity. Alpha features should be reviewed again before implementation because their contracts can change.

Start building on Major

Build a Google Analytics reporting app with durable evidence, an agent that interprets exceptions and a workflow that keeps consequential actions behind approval.

About the author

Ritvij Gautam is Head of Growth at Major.

Last reviewed November 20, 2026 by Ritvij Gautam.

Frequently asked questions

Does Google Analytics have AI built in?
Yes. Analytics Intelligence supplies automated insights, eligible properties can use predictive metrics, and Ask Advisor answers natural-language analytics questions. Custom insights also support configured conditions. Major adds cross-system investigation, durable review state and approval routing.
Can I automate Google Analytics reporting with Major?
Yes. Major has a native Google Analytics connector. Schedule report retrieval, store snapshots and campaign mappings in an app, invoke an agent for interpretation, and route consequential actions through a workflow approval.
What permissions does a Google Analytics AI agent need?
Standard Data API reporting supports the analytics.readonly OAuth scope, together with property access for the calling identity. Ask Advisor uses the separate analytics.chatbot.read scope. Grant only the permissions required by the selected operation.
Does GA4 send webhooks when campaign performance drops?
The reporting methods covered here do not document a campaign-performance webhook. Use scheduled reporting. Separate v1alpha audience-list webhooks report export creation status, not conversion anomalies.
Can I test the Data API against Google's demo account?
No. Google explicitly excludes the demo account from Analytics Data API access. Use a separate property you control for API integration tests and stored fixtures for repeatable failure tests.
Why do GA4 and marketing-platform numbers disagree?
Attribution, reporting identity, consent coverage, timezone boundaries, UTM mapping and reporting freshness can differ. Preserve those settings with each snapshot and investigate mismatches before treating them as campaign performance changes.