setup
This skill should be used when the user asks to "set up Google telemetry", "authenticate Google Analytics CLI", "connect Search Console CLI", "fix Google telemetry credentials", or a Google Analytics or Search Console reporting command fails because authentication or property access is missing.
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install claude-codex-settings-google-telemetry-setupManual setup by platform
Claude Code
~/.claude/skills/claude-codex-settings-google-telemetry-setup/SKILL.md
Instructions
Set up Google telemetry
Make the requested Analytics or Search Console read command work. Inspect installed tools and existing access before involving the user. Setup for one service does not require access to the other.
Check tools
These are third-party CLI wrappers around Google's official client libraries, not Google-supported products. Versions checked on 2026-11-08. Install only the CLI the requested service needs, and only when --version fails.
google-analytics-cli --version
google-search-console-cli --version
npm install --global [email protected]
npm install --global [email protected]
Sources: Analytics CLI, Search Console CLI. Recheck releases and help before upgrading.
Existing access first
Run the requested service's discovery call before creating anything:
google-analytics-cli accounts
google-search-console-cli sites
accounts lists every GA account and property the identity can read. sites lists Search Console properties with the identity's permission level.
Diagnose failures
Errors print as JSON on stderr with exit code 1. Report a redacted message.
Could not load the default credentials: no credential source is set. Both CLIs read--credentials <path>, then GA's--profileorGA_CLI_PROFILE, thenGOOGLE_APPLICATION_CREDENTIALS, then~/.config/<cli-name>/credentials.json, then Application Default Credentials (ADC). Look for an existing key or ADC login along that chain. Check file presence, permissions and the JSONtypefield (service_accountorauthorized_user) without displaying secret fields. A desktop OAuth client JSON (installed) is login configuration, not a credential. A stale higher-priority file can hide a working login.invalid_grant: the OAuth login expired or was revoked. Renew that identity after approval.- Insufficient scopes: request only the missing read scope after consent.
- API disabled or quota project errors: enable the API named in the error in the Cloud project that owns the credential.
- GA
7 PERMISSION_DENIEDor Search Console403 User does not have sufficient permission for site: the identity works but the property is not shared with it, or the ID is wrong. - An empty discovery list or report: authentication worked. Check sharing, dates, filters, property and processing delay instead of logging in again.
A gcloud auth login session, a browser session, an API key, a GTM container ID or a Measurement Protocol secret cannot read reports.
Service account setup
Prefer a dedicated service account whose JSON key does not expire and sees only what is shared with it. Creating the account, its key and each property grant requires the user's approval.
- In the Google Cloud project that will own the identity, enable the APIs the request needs: Google Analytics Admin API and Google Analytics Data API for Analytics, Google Search Console API for Search Console.
- Create a service account such as
google-telemetry-readerwith no project roles. Reporting access comes from GA and Search Console, not Cloud IAM. - Create a JSON key. If the organization policy
iam.disableServiceAccountKeyCreationblocks it, use the user OAuth setup below instead of weakening the policy. - Move the key to a private path such as
~/.config/<org>/google-telemetry-sa.jsonwith mode 600, and point the CLIs at it withGOOGLE_APPLICATION_CREDENTIALS. - In GA Admin, open Account access management for each account, add the service account email as Marketer with No Cost Metrics and No Revenue Metrics left unchecked so CLI and API calls can read cost/revenue metrics and manage audiences, key events, attribution models, lookback windows, and events (choose Editor if custom dimensions or data streams must also be edited via API, or Viewer with both restrictions ticked for strict read-only accounts), and untick Notify. An account-level grant covers its current and future properties. Granting requires the Administrator role. Google-managed accounts such as Chrome Web Store developer properties cannot be shared this way, so use user OAuth for them.
- In Search Console, open Settings, then Users and permissions, for each property and add the service account email as Restricted. Restricted is enough for Search Analytics, sitemaps and URL inspection.
User OAuth setup
Use this when a service account is not allowed or cannot be granted access. Reuse an approved desktop OAuth client. Request analytics.readonly for Analytics and webmasters.readonly for Search Console, both only when both services are needed. gcloud ADC login additionally requires cloud-platform, so explain that extra scope before consent. Do not overwrite an existing shared ADC login without checking its user and scopes.
gcloud auth application-default login \
--client-id-file=/private/path/desktop-client.json \
--scopes=https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/webmasters.readonly,https://www.googleapis.com/auth/cloud-platform
Without an approved desktop client, the user selects a Cloud project, enables the APIs, configures Google Auth Platform's audience and test users, and creates a Desktop app OAuth client. Ask for the local file path, never its contents. Sign-in and consent stay with the user. External OAuth apps in Testing can expire refresh tokens after seven days, so do not promise unattended long-term access.
Verify the requested access
Rerun discovery without logging in again and confirm every intended property is listed. Then run one small report per service on a listed property using the reporting recipes, with the discovered numeric GA property ID or exact Search Console site URL. Test aggregate usage, key events, revenue/cost metrics (when enabled), or search metrics only, never personal user records.
Report which service and property passed, or the exact remaining access gap. Do not call setup complete after only a login or an empty discovery result. Never print credential JSON, tokens or private keys, commit key files, or extract browser cookies as API credentials.
Google references: ADC, service account keys, Analytics access, Search Console permissions.
Security
Reviews (0)
Related skills
Browse all →More from claude-codex-settings
View source →More Build skills
Browse category →Frequently asked questions about setup
What does the setup skill do?
This skill should be used when the user asks to "set up Google telemetry", "authenticate Google Analytics CLI", "connect Search Console CLI", "fix Google telemetry credentials", or a Google Analytics or Search Console reporting command fails because authentication or property access is missing. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the setup skill?
Run `npx @skills-hub-ai/cli install claude-codex-settings-google-telemetry-setup` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/claude-codex-settings-google-telemetry-setup/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does setup work with?
setup runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the setup skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use setup after installing it?
In Claude Code, type `/claude-codex-settings-google-telemetry-setup` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the setup skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.