Google Analytics 4 includes AI features that automatically surface data anomalies, predict user behavior, and present plain-language summaries of key changes. You can also connect GA4 to external AI tools like Claude or Gemini to query your data with natural language.
The built-in AI capabilities help you spot issues and opportunities faster, while predictive metrics and custom insights let you automate monitoring. This guide covers each AI feature and how to set it up.
Generated Insights
When you open GA4, the Home page often shows a set of AI-generated insight cards. These automated overviews highlight the most critical changes since your last visit, such as completed Google Ads or Search Console integrations, significant traffic anomalies, and seasonality shifts. Each card includes a brief description and a tailored call-to-action button like View Report or View Insight.
You interact with these cards to tell the system what you value. Use the thumbs-up icon if an insight is useful, or the thumbs-down icon if it is not relevant. You can also collapse the section. Over time, Analytics Intelligence learns which types of insights you engage with and ranks new ones accordingly.
Below the cards, scroll to the Insights section and click View all insights to open the Insights dashboard. This dashboard shows the most recent automated and custom insights for the property, refreshed in real time when Analytics identifies interesting changes. Insights are retained for one year. You can click any card for full details and use Load more to browse older insights.
To create a custom insight, click Create on the dashboard. You can use a suggested template, modify one, or start from scratch. Define an evaluation frequency, hourly, daily, weekly, or monthly. Hourly evaluation is available only for web data; app events are excluded because of collection delays that would trigger false notifications. Then choose a segment (all users by default) and a metric condition. For example, you might set "30-day active users - % decrease more than - 20." When the condition is met, the insight triggers and appears on the dashboard. You can also add email alerts for specific users. You need the Editor or Administrator role to create or edit insights. Each property supports up to 50 custom insights.
Asking Questions In Plain Language
On top of Home page cards, GA4 places AI overviews in your detail reports. These sit at the top of the report page and summarize trends or significant changes in plain language. For example, if purchase events spiked on a series of dates, the overview explains why by connecting dots across dimensions and metrics, written so you do not have to query reports manually.
Each overview includes a call-to-action button that modifies the report based on the insight. This turns the overview into a direct jumping-off point, not just a message.
To provide feedback, use the thumbs-up or thumbs-down icons at the top right of the overview. A thumbs-down signals that the insight was not helpful, while a thumbs-up confirms its value. To dismiss the banner entirely, click the close button, also in the top right corner. The system uses this feedback to refine future overviews.
Short on time? Analytics Art can check this in your property for you.
Predictive Metrics And Audiences
GA4's predictive capabilities go beyond reporting what happened. They estimate the likelihood of future user actions. The following metrics are available once your property is eligible:
| Metric | Definition |
|---|---|
| Purchase probability | Probability that a user active in the last 28 days will log a purchase or in_app_purchase event within the next 7 days. |
| Churn probability | Probability that a user active in the last 7 days will not be active within the next 7 days. |
| Predicted revenue | Expected revenue from all purchase key events within the next 28 days from a user active in the last 28 days. |
| In-app purchase probability | Probability that a user active in the last 28 days will trigger an in_app_purchase event within the prediction window. |
To become eligible, your property must send the purchase (recommended) or in_app_purchase event with the value and currency parameters. See GA4 ecommerce events for full setup details. In the last 28 days, over a seven-day period, at least 1,000 returning users must have triggered the relevant predictive condition (purchase or churn) and at least 1,000 returning users must not have. Model quality must be sustained; if it falls below the minimum threshold, Analytics will stop updating the predictions and they may become unavailable.
You can check eligibility inside the audience builder under the predictive section of suggested-audience templates. Predictive metrics are generated for each active user once per day. Use them to build predictive audiences (for example, likely purchasers), or in Explore > User lifetime technique. In explorations, data splits into two rows per audience: users with prediction metrics and users without, because not every user has enough data for a prediction. Best practices: turn on the Modeling contributions & business insights data-sharing setting, collect a wide variety of recommended events, and reduce noisy events that are not meaningful for user behavior.
Anomaly Detection
Analytics Intelligence applies two statistical techniques to detect anomalies in your data. First, time-series anomaly detection uses a Bayesian state-space time series model. The model is trained on historical data to predict the value of the current metric. For hourly anomalies, the training period is two weeks. For daily, it is 90 days. For weekly, it is 32 weeks. If the actual observed value falls outside the predicted credible interval, the data point is flagged as an anomaly and appears on the Insights dashboard.
Second, a segment-level anomaly detection runs each week. This approach uses principal components analysis (PCA) to use the correlation structure across multiple metrics and dimension values. All possible dimension values create many segments, each normalized by the number of users within that segment. PCA flags any segment that shows anomalous behavior across any metric and contains at least 0.05% of the property's users. Those segments are surfaced as anomalies.
These automated anomalies feed into the Home page cards and the Insights dashboard. When creating a custom insight, you can select the Has anomaly condition for a metric. This lets Analytics determine when the change is anomalous, you do not need to enter a percentage or value. Example: choose "Has anomaly" for the Event count metric to get an alert whenever events spike or drop unusually. This is useful for search campaign performance or sudden traffic shifts that you want pointed out immediately.
Connecting GA4 To Outside AI Tools
Beyond the built-in features, you can connect GA4 to an external large language model using the Google Analytics Model Context Protocol (MCP) server. This open-source server (GitHub repo) lets you ask natural-language questions such as "What were my top selling products yesterday?" directly from Gemini, Claude Desktop, or Cursor. The server uses the Admin API and Data API v1 to provide read-only tools.
To set up, first check that you have Python 3.10 or higher and a package runner like pipx or uvx. You also need a Google Cloud project with the Analytics Admin API (analyticsadmin.googleapis.com) and Analytics Data API (analyticsdata.googleapis.com) enabled. In the Google Analytics UI, grant your user or service account at least the Viewer role on the target property. Then authenticate using Application Default Credentials (ADC) with the scope https://www.googleapis.com/auth/analytics.readonly. For user credentials, run gcloud auth application-default login --scopes and pass the read-only and cloud-platform scopes. For a service account, set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the JSON key file path.
Next, configure your MCP client. Below is a Gemini CLI example: add the server to ~/.gemini/settings.json with "command": "pipx", "args": ["run", "analytics-mcp"] and the environment variables GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_CLOUD_PROJECT. For Claude Desktop, edit claude_desktop_config.json and use the same JSON block. After restart, your AI assistant can call tools like run_report, get_custom_dimensions_and_metrics, or run_funnel_report. All requests are read-only; to enable write tools like creating annotations, pass the --allow-write flag and use the analytics.edit scope. For a complete walkthrough and Docker deployment steps, see our GA4 MCP server guide.
Frequently Asked Questions
Does Google Analytics Show AI-Generated Traffic?
Google Analytics records visits from AI tools like any other traffic. When the tool passes a referrer, the visit shows in your acquisition reports under that source, usually as a referral; visits without a referrer are counted as direct.
Which AI Models Power GA4 Features?
Google uses Bayesian state-space models for time-series anomaly detection, principal components analysis for segment-based anomalies, and machine learning models for predictive metrics (purchase probability, churn, predicted revenue). The exact model architectures are not disclosed in user-facing documentation.
What Are AI-Powered Analytics In GA4?
AI-powered analytics in GA4 include automated insights on the Home page, anomaly detection, predictive metrics (purchase probability, churn, revenue), and plain-language AI overviews in detail reports. The term also covers the suggested-audience templates that use predictive conditions.
Is Google Analytics 100% Accurate?
No. Its AI features are estimates: predictive metrics are generated once per day from models and may become unavailable if model quality drops below the required threshold, and anomaly detection compares values against a predicted credible interval.
How Can I Connect Google Analytics To Claude?
Use the Google Analytics MCP server to query your GA4 property from Claude Desktop or Claude Code. After enabling the APIs and authenticating, add the MCP server to your Claude configuration and ask questions in natural language, such as "What were my top selling products yesterday?"
What Is The GA4 AI Assistant?
The GA4 AI assistant is a collection of features: AI overviews on the Home page and in detail reports that highlight key changes, automated anomaly insights, and predictive audiences.
Can I Ask Questions Inside GA4 Using Natural Language?
The AI overviews in detail reports automatically answer common "what changed" questions in plain language. For conversational querying, connect to an external LLM through the GA4 MCP server.
Related GA4 Guides
- The GA4 API Explained: Data, Admin And Measurement ProtocolThe GA4 API includes Data API, Admin API, and Measurement Protocol to pull reports, manage settings, and send server-side events. Learn how to get started.
- The Google Analytics MCP Server: Query GA4 From Claude And Other AI ToolsUse the official Google Analytics MCP server to ask GA4 questions in Claude, Gemini, or Cursor. Setup steps, read-only access, and quota limits explained.
- GA4 Measurement Protocol: Send Events From Your ServerUse the GA4 Measurement Protocol to send events from your server, create an API secret, build a request, validate with debug, and understand its limits.
- How To Connect GA4 To Looker StudioConnect GA4 to Looker Studio and build a custom dashboard for Google Analytics. Step-by-step guide to data sources, reports, templates, and quota limits.
- How To Export GA4 Data To BigQueryExport raw GA4 events to BigQuery for SQL analysis. Learn to link properties, choose daily or streaming export, understand the schema, and run your first queries.
More in APIs & Integrations or browse all GA4 guides.