Connector guide — Google Ads (google_ads)

Fixed sections (Phase D1 format; tests/governance/test_onboarding_connector_guides.py pins them). Facts marked [Validated] are measured in code or tests; [Observed] facts carry a date; [Gap] names an open item. No credential, token, account identifier or tenant value appears in this file. No connector is unconditional; consent is the one universal requirement.

What it is

The customer's Google Ads account, read through the Google Ads API with an OAuth refresh-token flow (the customer's own OAuth client) for the paid-media direct pull, and the Enhanced Conversions rail. Catalog category paid-media, wave 1.

Status (measured)

[Validated] available: true in CONNECTOR_CATALOG (services/service-marketing-connectors/connector_credentials.py, measured 2026-10-12). Required fields oauth_client_id, oauth_client_secret, refresh_token, customer_id; optional login_customer_id and developer_token (legacy — "not needed", never sent). [Validated] Google sunset developer tokens on 2026-09-09; the ping and the pull send no developer-token header (API-D1/E3, catalog comment). API access belongs to the Google Cloud project that owns the OAuth client. [Validated] test connection is a hard check: OAuth refresh → listAccessibleCustomers must contain the declared customer (or the MCC when login_customer_id is set) → one read-only googleAds:search query on the customer. Required only where the tenant declared the Google Ads rail in pilot.measurement_rails. [Gap] OB-GAP-1: a small business without its own Cloud project cannot complete this card self-serve today.

Who owns the account

The customer. The Google Ads account, the Google Cloud project and its OAuth client stay in the customer's Google account; MIZ OKI is a user they can remove (law 3). Credentials resolve per tenant from the vault only — never from the process environment, never from an operator's account (D2/D11; direct_connectors.py).

Prerequisites

Visibility invite (click path)

ads.google.com → Admin (gear) → Access and security → Users → + → enter the Media Intelligence access seat → access level Standard (Read only acceptable) → Send invitation. Vendor UIs drift — if a label differs, follow Google's current help article ("Manage access to your Google Ads account"). This invite is for discovery; it is not the API connection (playbook §5).

Connecting in the onboarding UI

  1. Open /onboarding → Connectors → the Google Ads card (shown as required only when the tenant declared the Google Ads rail; otherwise optional).
  2. Enter oauth_client_id and oauth_client_secret from the customer's Cloud project (APIs & Services → Credentials), and the refresh_token minted for the OAuth user. Leave developer_token blank.
  3. Enter customer_id (10 digits, dashes optional) and, only if access is through a manager account, login_customer_id (same format).
  4. Click Test connection. Move on only when it passes — the check reads the account the way the pull will.

Fields

key where the tenant finds it format secret? required?
developer_token not needed (legacy; sunset 2026-09-09) leave blank; a value saved before the sunset stays masked and is never sent yes no
oauth_client_id Cloud Console → APIs & Services → Credentials → the OAuth client ends in .apps.googleusercontent.com (catalog pattern) no yes
oauth_client_secret same OAuth client catalog placeholder GOCSPX-…; never echoed, masked hint only yes yes
refresh_token minted by the OAuth consent flow for the OAuth user catalog placeholder 1//…; never echoed yes yes
customer_id Google Ads UI, top-right next to the account name exactly 10 digits, dashes optional (catalog pattern ^\d{3}-?\d{3}-?\d{4}$) no yes
login_customer_id the manager (MCC) account's id, same place same 10-digit format no no

Test connection

Failure Plain-English fix
422 invalid_field_format on customer_id / login_customer_id Use the 10-digit customer id shown top-right in Google Ads (dashes optional). Never an AW-… conversion tag or a GT-… tag — those are browser gtag ids and cannot be converted.
422 invalid_field_format on oauth_client_id Use the full client id ending in .apps.googleusercontent.com.
"OAuth refresh failed: " The client id/secret pair and the refresh token do not match, or the token was revoked. Mint a new refresh token with the same OAuth client and re-save all three.
"… customers/ is not accessible to this OAuth user …" Either the customer id is wrong, or the OAuth user reaches the account only through a manager account — set login_customer_id to the MCC id.
"… manager account customers/ is not accessible to this OAuth user …" The refresh token must belong to a user on the MCC; mint it as that user, or clear login_customer_id if access is direct.
access_error: CLOUD_PROJECT_NOT_APPROVED_FOR_PRODUCTION The Cloud project that owns the OAuth client has Test access only. In Cloud Console open that project's Google Ads API Overview page and apply for Explorer (or Basic) access, then retry.
access_error: ACTION_NOT_PERMITTED Check the Cloud project's access level and that the OAuth user may act on the account.
access_error: USER_PERMISSION_DENIED Grant the OAuth user access to the account, or set the manager (MCC) id it reaches the account through.
access_error: CUSTOMER_NOT_ENABLED The Google Ads account is cancelled or never set up; pick an active account.
api_version_refused in the response The configured Google Ads API version is retired; an operator corrects the version setting. Nothing for the customer to re-enter.
404 not_configured (stored-credential test) Nothing is saved for this tenant yet; connect first.
429 test_rate_limited More than 20 tests for this provider in 60 s from this tenant; wait the retry_after_seconds it names.
503 fail-closed (vault error) The credential vault could not be read; an operator checks vault health. Nothing for the customer to re-enter.

What it feeds

The paid-media direct pull (GoogleAdsAdapter, direct_connectors.py), bound to the declared customer_id (an account_id in a sync request is a confirmation that must match it — account_not_declared / account_not_bound_to_tenant otherwise; an access error on the pull is 503 google_ads_access_not_configured with the same remedy text), aggregates into canonical ingestion → mizoki_unified_data. The Enhanced Conversions rail (services/measurement-rails/google_enhanced_conversions.py, customers/{customer_id}:uploadConversionAdjustments) stays dark under MEASUREMENT_WRITEBACK=false; collecting the credentials arms nothing (law 8).

Campaign and account reports are aggregate and de-personalised by construction. Enhanced Conversions carry hashed person-level identifiers: any such event passes the consent gate first (fail-closed, per-event basis required); without a per-subject basis the person-level fields stay dark. The tenant's consent declaration (P2-5) is required of every tenant and never substitutes for a per-subject basis. Consent is the one universal requirement; no connector is unconditional.

Revoke / offboard

Customer side: Google Account → Security → Third-party access → remove the OAuth client's grant (invalidates the refresh token); Cloud Console → delete or rotate the OAuth client secret; Google Ads → Admin → Access and security → remove the MIZ OKI seat. Platform side: the operator removes the tenant's google_ads vault entry through the governed path, or offboards the whole tenant with POST /api/v1/tenant/offboard/credentials; readiness then reports connectors.google_ads:not-configured where the rail is declared.

Known gaps

Last verified

Catalog and readiness code measured 2026-10-12 on main 47309238. Vendor documentation: Google Ads API — "Developer token" (developers.google.com/google-ads/api/docs/api-policy/developer-token) — fetched 2026-10-12; Google Ads API — "Use OAuth 2.0 to access Google Ads API" (developers.google.com/google-ads/api/docs/oauth/overview) — fetched 2026-10-12; Google Ads Help — "Manage access to your Google Ads account" (support.google.com/google-ads/answer/6372672) — fetched 2026-10-12. Lane records: docs/tenants/TENANT_ONBOARDING_CHECKLIST.md P2-1 and §5.6; provider_versions.py GOOGLE_ADS_ACCESS_REMEDIES.

← All docsView source on GitHub →