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.

referencesjava.md

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

Google Analytics Admin API Java Client Library Installation

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

Prerequisites

  • Java Development Kit (JDK): Java 8 or higher (Java 11+ recommended).
  • Build Tool: Maven or Gradle.
  • Authentication: Application Default Credentials (ADC) configured via gcloud auth application-default login.

Installation

Add the official Google Analytics Admin client library dependency to your project.

[!NOTE] For more information and full documentation, refer to the Google Cloud Java Analytics Admin Repository.

[!TIP] Always replace LATEST_LIBRARY_VERSION with the latest stable version of the dependency available on Maven Central.

Option A: Maven (pom.xml)

Add the following dependency to your pom.xml inside <dependencies>:

<dependency>
  <groupId>com.google.cloud</groupId>
  <artifactId>google-cloud-analytics-admin</artifactId>
  <version>LATEST_LIBRARY_VERSION</version>
</dependency>

Why: Using Maven ensures transitive dependencies (like Netty, gRPC, and Google Auth Library) are automatically resolved.

Option B: Gradle (build.gradle)

Add the following to your dependencies block:

implementation 'com.google.cloud:google-cloud-analytics-admin:LATEST_LIBRARY_VERSION'

Quickstart / Usage

Initialize the client using try-with-resources to automatically close the gRPC channel:

import com.google.analytics.admin.v1beta.AnalyticsAdminServiceClient;
import com.google.analytics.admin.v1beta.AccountSummary;

public class AdminApiDemo {
  public static void main(String[] args) throws Exception {
    // Initialize the client. Automatically authenticates using ADC.
    try (AnalyticsAdminServiceClient client = AnalyticsAdminServiceClient.create()) {
      for (AccountSummary summary : client.listAccountSummaries().iterateAll()) {
        System.out.printf("Account: %s (%s)%n", summary.getDisplayName(), summary.getName());
      }
    }
  }
}

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