Skip to main content
modiva.ai
Sign In
← All docs

Setup guide

Connect Google Analytics 4

AnalyticsOAuthGA4 developer docs ↗

Google Analytics 4 connects through standard Google OAuth with a single scope: analytics.readonly. That makes the connection read-only by design — Modiva can query your data, but it can never change your Analytics settings, properties or tracking. Once connected, Modiva can list your accounts and properties, run reports with any combination of metrics and dimensions over any date range, pull realtime data, and use ready-made presets like traffic-by-source and top-pages — all through one unified API and MCP server. This is what closes the social-to-revenue loop: tie the posts you publish to real traffic and conversions and finally answer which post drove traffic that actually converted. Google tokens are refreshed automatically, so the connection stays healthy without you reconnecting.

Before you start

  • A Google account with access to at least one Google Analytics 4 property.
  • Permission to authorize a third-party OAuth app for that account (some Workspace domains restrict this).

Step-by-step setup

  1. 1

    Sign in to Modiva

    Log in at modiva.ai and open the Dashboard. You need a Modiva account before you can connect any platform — creating one takes a minute and no credit card is required for the free tier.

  2. 2

    Open Connections → New connection

    In the left sidebar choose Connections, then click New connection. You'll see the full catalogue of platforms grouped by category (Social, Ads, CRM, E-commerce, Marketing, Creative, Productivity, Payments, Dev & Infra and Analytics).

  3. 3

    Select Google Analytics 4 and authorize

    Click the Google Analytics 4 card. Modiva redirects you to Google's official consent screen — sign in and approve the single read-only Analytics scope. That's all Modiva asks for: it can read your reports but can never modify your Analytics setup. Your password is entered on Google, never on Modiva.

  4. 4

    You're connected

    Google sends you back to Modiva and the connection appears with a green Connected status. From here it's available to every MCP key and API call in your workspace. Modiva refreshes the Google token automatically in the background, so you won't need to reconnect.

What Modiva can access

Google shows the requested access on its consent screen before you approve. The connection asks for exactly one scope — analytics.readonly — so Modiva can query your GA4 data but can never change your Analytics configuration, properties or tracking. You can revoke access any time from your Google account or by disconnecting in Modiva.

  • List the Analytics accounts and GA4 properties your Google account can access
  • Run reports: any metrics × dimensions over any date range
  • Read realtime reports (active users right now)
  • Read property metadata (available metrics and dimensions)
  • Use built-in presets: traffic by source, top pages

Troubleshooting & FAQ

Does Google Analytics 4 connect with OAuth or an API key?

With standard Google OAuth. You authorize Modiva on Google's own consent screen; Modiva only receives a scoped token, which is encrypted at rest with AES-256-GCM. Your password is never entered on Modiva.

Can Modiva change my Analytics settings?

No — and it can't even ask to. The connection requests a single scope, analytics.readonly, so Modiva can query reports but has no ability to modify properties, data streams, audiences, tracking or any other Analytics configuration. Read-only by design.

Which properties can Modiva read?

All GA4 properties the connected Google account can access. The list_accounts and list_properties tools show what's available, and every report tool takes an explicit property id, so nothing runs against a property you didn't specify.

What kind of reports can I run?

Anything the GA4 Data API supports: run_report accepts any combination of metrics and dimensions over any date range, there's a realtime report for active users right now, a metadata tool to discover what's available on a property, plus traffic-by-source and top-pages presets. The killer use case is tying your social posts to real traffic and conversions — which post drove traffic that actually converted.

Does this work with Universal Analytics?

No. The connector uses the GA4 Data API and works with GA4 properties only — Universal Analytics was sunset by Google and its API no longer serves data. If you still have UA properties, they won't appear as queryable.

How do I disconnect?

Open Connections, click the Google Analytics 4 row and choose Disconnect — Modiva deletes the stored token immediately. You can also revoke the authorization from your Google account under Security → Third-party apps & services.

Need help with Google Analytics 4?

Reach the team any time from our support page, or ask Fin, our AI support agent.