Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gradial.com/llms.txt

Use this file to discover all available pages before exploring further.

Connecting Google Analytics to Gradial gives your agents access to real-time and historical performance data — page views, sessions, bounce rates, conversions — so they can make content decisions grounded in how your audience actually behaves.
Before connecting, confirm with your legal, privacy, or data governance team that your organization has approval to share analytics data with Gradial. This includes ensuring the connection complies with any applicable data processing agreements, privacy policies, or regional data regulations.

What You Can Do

CapabilityDescription
Performance-informed editsSurface underperforming pages and trigger content update tasks automatically
Traffic data in contextReference GA metrics when drafting or updating content
Optimization workflowsRoute low-performing URLs into content review queues
Audience signalsUse GA audience and behavior data to guide personalization decisions

Prerequisites

Before connecting Google Analytics to Gradial, make sure you have:
  • A Google Analytics 4 (GA4) property (Universal Analytics is not supported)
  • A Google Cloud project with the Google Analytics Data API enabled
  • A service account with Viewer-level access to the GA4 property, and a JSON key generated for it
  • A Gradial organization Administrator role to complete setup

How to Connect

1

Enable the Google Analytics Data API

In your Google Cloud project, go to APIs & Services → Library, search for Google Analytics Data API, and enable it.
2

Create a service account and JSON key

  1. In your Google Cloud project, go to IAM & Admin → Service Accounts and click Create Service Account.
  2. Give it a descriptive name (e.g., gradial-analytics).
  3. Under Keys, select Add Key → Create new key (JSON). Download the JSON file and keep it open — you will paste its contents into Gradial in Step 4.
3

Grant the service account access to your GA4 property

  1. In Google Analytics, open Admin for the property you want to connect.
  2. Under Property Access Management, add the service account email with the Viewer role.
4

Add the integration in Gradial

  1. In Gradial, go to Settings → Integrations.
  2. Find Google Analytics and click + Add.
  3. Enter an Integration Name (e.g., My Google Analytics Connection).
  4. The Google Analytics API URL is pre-filled as https://analyticsdata.googleapis.com — leave this as-is.
  5. Under Authentication Type, OAuth 2.0 JWT Bearer is selected by default.
  6. In the Service Account JSON Key field, paste the full contents of the JSON key file downloaded in Step 2.
  7. The Scopes field defaults to https://www.googleapis.com/auth/analytics.readonly and Token Endpoint defaults to https://oauth2.googleapis.com/token — leave both as-is unless directed otherwise.
  8. Optionally, enter a Default GA4 Property ID. This is the numeric Property ID from Google Analytics → Admin → Property Settings. When provided, Gradial uses it automatically when no property is specified in a prompt.
  9. Click Validate Connection to confirm the credentials work, then click Validate & Save.
5

Assign to an Environment

  1. Go to Settings → Environments and select the Environment where analytics data should be available.
  2. Add the Google Analytics integration to that Environment.
  3. Repeat for any additional Environments.

Field Reference

FieldDescription
Integration NameA display name for this connection in Gradial (e.g., My Google Analytics Connection)
Google Analytics API URLPre-filled as https://analyticsdata.googleapis.com — do not change
Authentication TypeFixed to OAuth 2.0 JWT Bearer
Service Account JSON KeyPaste the full JSON key content from Google Cloud
ScopesDefaults to https://www.googleapis.com/auth/analytics.readonly
Token EndpointDefaults to https://oauth2.googleapis.com/token (from the JSON key’s token_uri)
Default GA4 Property IDOptional. The numeric GA4 Property ID used when no property is specified in a prompt

Troubleshooting

Validation fails with “Permission denied” Confirm the service account has been added as a Viewer in Google Analytics → Admin → Property Access Management and that the Analytics Data API is enabled in your Cloud project. GA4 Property ID not found Your Property ID is a numeric string found under Admin → Property Settings → Property ID. It is not the same as the Measurement ID (which starts with G-). Integration not available in a Workspace Assign the integration to the correct Environment under Settings → Environments.

Support

Contact your Gradial onboarding lead or email [email protected] for help with setup.