ga4_configure
Save a GA4 property so every other tool can use it by name, and remember it across sessions. Give either property_id or firebase_project (the linked GA4 property is looked up). Choose how to authenticate with auth_type.
Instructions
Save a GA4 property so every other tool can use it by name, and remember it across sessions. Give either property_id or firebase_project (the linked GA4 property is looked up). Choose how to authenticate with auth_type. The connection is tested before saving, unless skip_test is true. Saving an existing name replaces it. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4; con firebase_project, además Firebase Viewer en ese proyecto. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Short label for this property, e.g. "my-app-prod" | |
| key_file | No | Absolute path to the credentials JSON. Required when auth_type is credentials_file | |
| auth_type | No | How to authenticate: "adc" uses the machine's Application Default Credentials (gcloud auth application-default login); "credentials_file" uses a service account key or authorized_user JSON at key_file; "access_token" uses a raw OAuth token (expires in about an hour) | adc |
| skip_test | No | Save without testing the connection | |
| description | No | Free note about this property | |
| property_id | No | GA4 property id (numbers only), e.g. "123456789" | |
| access_token | No | OAuth access token. Required when auth_type is access_token | |
| make_default | No | Use this property when a tool call names none | |
| quota_project | No | Google Cloud project billed for API quota. Needed with adc user credentials; defaults to firebase_project. Not needed for service accounts | |
| firebase_project | No | Firebase project id; used to look up the GA4 property when property_id is not given, e.g. "my-firebase-project" |