Google Analytics Admin Api Basics logo

Google Analytics Admin Api Basics

OrganizationPopular
google
google-analytics-admin-api-basics

Manages Google Analytics account and property settings, enables the Analytics Admin API via the Cloud CLI, lists accounts and properties, and manages data streams, custom dimensions, conversion events, and integrations. Use when you need to programmatically configure Google Analytics accounts, provision properties, manage data retention, configure Measurement Protocol secrets, or manage Firebase and Google Ads links.

Overview

Publishergoogle
Repositoryskills
Skill namegoogle-analytics-admin-api-basics
Stars
20.1K
Forks
1.6K
Bundled files
7
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by google on GitHub. Read the source before you install it.

Installation

Install the Google Analytics Admin Api Basics AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/google/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/analytics/google-analytics-admin-api-basics .claude/skills/google-analytics-admin-api-basics
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Google Analytics Admin Api Basics in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Google Analytics Admin Api Basics on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Google Analytics Admin Api Basics is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Getting Started with Google Analytics Admin API

The Google Analytics Admin API provides programmatic access to Google Analytics account and property configuration. It lets you automate account management, manage data streams, configure custom dimensions, and handle product integrations.

Enabling the API via Cloud CLI

Before making API calls, ensure the Google Analytics Admin API is enabled in your Google Cloud project.

If gcloud is not found, prompt the user to install the Google Cloud CLI before running these commands.

  1. Enable the API: Use the Cloud CLI (gcloud) to enable analyticsadmin.googleapis.com.

    bash
    gcloud services enable analyticsadmin.googleapis.com --quiet

    Why: Enabling the API ensures your Cloud project has the necessary quota and permissions allocated for managing Google Analytics configurations.

  2. Verify API Enablement:

    bash
    gcloud services list --enabled --filter="analyticsadmin.googleapis.com"

Authentication

To authenticate your API requests, you must generate Application Default Credentials (ADC) and give your account the necessary scopes. Run the following command in your terminal:

bash
gcloud auth application-default login --scopes="https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/analytics.readonly"

Why: This configures ADC in your local environment with the required Cloud Platform and Google Analytics read-only scopes, allowing the client library to automatically authenticate your requests.

[!NOTE] Configuration Changes: Methods changing the Google Analytics account/property configuration will need the https://www.googleapis.com/auth/analytics.edit scope.

Admin API Use Cases

You can use the Google Analytics Admin API to:

  • Run Data Access reports (see https://developers.google.com/analytics/devguides/config/admin/v1/access-api.md.txt for more info)
  • Create Account summaries
  • Manage accounts
  • Provision new accounts
  • Search account change history events
  • Manage and create properties
  • Manage property data retention settings
  • Manage conversion events
  • Manage custom dimensions and metrics
  • Manage data streams and configure measurement protocol secrets
  • Manage Firebase links
  • Manage Google Ads links
  • Manage key events

v1alpha-Only Use Cases

The following capabilities are currently available only in the v1alpha version of the Admin API:

  • Manage account and property access bindings
  • Create and manage rollup properties
  • Create and manage subproperties
  • Acknowledge user data collection
  • Change property attribution, data retention, Google signals, reporting identity, and User Provided Data settings
  • Manage AdSense links
  • Manage BigQuery links
  • Manage audiences
  • Manage channel groups
  • Manage calculated metrics
  • Manage DisplayVideo360Advertiser links
  • Manage expanded data sets
  • Manage reporting data annotations
  • Manage SearchAds360 links
  • Manage event create rules for a data stream
  • Manage SKAdNetwork conversion value schema of an iOS stream
  • Submit a request for user deletion for a Google Analytics property.

Calling the Admin API

To interact with the Admin API, use the official Google Analytics Admin client library. Note that v1beta is the most stable version of the Admin API. For the latest features, consider using v1alpha.

[!IMPORTANT] Mandatory Agent Directive: When the user selects or requires a specific programming language, read the corresponding client library setup reference guide in references/ listed below.

Supported Client Libraries

Python

If you need to install or set up the Google Analytics Admin API client library for Python, read the setup guide:

Java

If you need to install or set up the Google Analytics Admin API client library for Java, read the setup guide:

PHP

If you need to install or set up the Google Analytics Admin API client library for PHP, read the setup guide:

Node.js

If you need to install or set up the Google Analytics Admin API client library for Node.js, read the setup guide:

Go

If you need to install or set up the Google Analytics Admin API client library for Go, read the setup guide:

.NET

If you need to install or set up the Google Analytics Admin API client library for .NET / C#, read the setup guide:

Ruby

If you need to install or set up the Google Analytics Admin API client library for Ruby, read the setup guide:

[!NOTE] Additional Resources: For further examples of calling the Admin API with Java, PHP, Node.js, .NET, Python, and REST, as well as hints on authentication with a service account, refer to the official Admin API Quickstart. For complete API reference documentation for both v1alpha and v1beta, see the Admin API Reference.

Python Quick Start

  1. Install the Client Library:

    bash
    pip install google-analytics-admin

    If pip is not available, prompt the user to install pip before installing the client library.

  2. List Accounts and Properties: Below is a complete example demonstrating how to call the Admin API to list all available accounts and their child properties for the current user using list_account_summaries().

    python
    from google.analytics.admin import AnalyticsAdminServiceClient
    
    def sample_list_account_summaries():
        # Initialize the client.
        # Assumes Application Default Credentials (ADC) are configured in your environment.
        client = AnalyticsAdminServiceClient()
    
        # list_account_summaries returns a summary of all accounts accessible to the
        # user and their child properties.
        account_summaries = client.list_account_summaries()
    
        print("Available Google Analytics Accounts and Properties:")
        for summary in account_summaries:
            print(f"Account: {summary.display_name} ({summary.account})")
            for property_summary in summary.property_summaries:
                print(f"  Property: {property_summary.display_name} ({property_summary.property})")
    
    if __name__ == "__main__":
        sample_list_account_summaries()

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Google Analytics Admin Api Basics AI skill do?

Manages Google Analytics account and property settings, enables the Analytics Admin API via the Cloud CLI, lists accounts and properties, and manages data streams, custom dimensions, conversion events, and integrations. Use when you need to programmatically configure Google Analytics accounts, provision properties, manage data retention, configure Measurement Protocol secrets, or manage Firebase and Google Ads links.

Why use Google Analytics Admin Api Basics on TypingMind?

Because you install it once and use it with any model. Google Analytics Admin Api Basics is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Google Analytics Admin Api Basics in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/google/skills/tree/main/skills/analytics/google-analytics-admin-api-basics. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Google Analytics Admin Api Basics?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Google Analytics Admin Api Basics?

As many as you like. As long as a model supports skills, you can use Google Analytics Admin Api Basics with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Google Analytics Admin Api Basics AI skill free?

Yes. It is published on GitHub by google under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇