All skills
google avatar

/google-analytics-admin-api-basics

@becc4b8
by googlegoogle/skills21k stars
1,698

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.

Use this Skill: https://skilld.dev/gh/google/skills/google-analytics-admin-api-basics

This session only. Nothing lands on disk.

referencespython.md

≈432 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Google Analytics Admin API Python Client Library Installation

This guide provides specific instructions for installing and setting up the Google Analytics Admin API client library for Python.

Prerequisites

  • Python: Version 3.8 or higher.
  • Package Manager: pip
  • Authentication: Application Default Credentials (ADC) configured via gcloud auth application-default login.

Installation

Install the official Python client library within a virtual environment.

[!NOTE] For complete details, see the Python Analytics Admin README.

1. Create and Activate a Virtual Environment

python3 -m venv .venv
source .venv/bin/activate

2. Install the Client Library

pip install google-analytics-admin

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

Why: Installing individual packages in a virtual environment prevents version collisions with standard system libraries.

Quickstart / Usage

from google.analytics.admin import AnalyticsAdminServiceClient

def list_accounts():
    # Initialize client. Automatically authenticates via ADC.
    client = AnalyticsAdminServiceClient()

    account_summaries = client.list_account_summaries()

    print("Available Accounts and Properties:")
    for summary in account_summaries:
        print(f"Account: {summary.display_name} ({summary.account})")
        for prop in summary.property_summaries:
            print(f"  Property: {prop.display_name} ({prop.property})")

if __name__ == "__main__":
    list_accounts()

Source: SKILL.md on GitHub

No alerts10d3 checks · Risk SAFE
  • Gen Agent Trust Hub10d

    This skill provides guidance on using the Google Analytics Admin API. It includes instructions for enabling the API, authenticating using standard tools, and installing official client libraries for multiple programming languages. No security issues were identified.

  • Socket10d

    No alerts

  • Snyk10d

    Risk: LOW · No issues

Signed by skilld at becc4b8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last week
metadata
{
  "version": "1.0.0",
  "category": "GoogleAnalytics"
}

README badge

README badge for google/skills/google-analytics-admin-api-basics