All skills
google avatar

/google-analytics-data-api-basics

@becc4b8
by googlegoogle/skills21k stars
1,698

Manages Google Analytics reporting data, enables the Analytics Data API via the Cloud CLI, and creates reports using the Google Analytics Data API (v1beta). Use when you need to interact with Google Analytics properties, run customized analytics reports, query metrics (like activeUsers, screenPageViews) and dimensions (like city, date), check metrics and dimensions compatibility, or verify API enablement. Don't use for Google Analytics Admin API operations (e.g., creating properties, managing users) or for front-end tracking installation.

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

This session only. Nothing lands on disk.

referencesdotnet.md

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

Google Analytics Data API .NET Client Library Installation

This guide provides specific instructions for installing and setting up the Google Analytics Data API (v1beta) client library for .NET / C#.

Prerequisites

  • .NET SDK: .NET Core 3.1, .NET Standard 2.0, or .NET 6.0+.
  • Package Manager: NuGet / dotnet CLI.
  • Authentication: Application Default Credentials (ADC) configured via gcloud auth application-default login.

Installation

Install the official NuGet package.

[!NOTE] For package management options, see the NuGet Google.Analytics.Data.V1Beta Page.

Run the following command using the .NET CLI:

dotnet add package Google.Analytics.Data.V1Beta

If dotnet is not available, prompt the user to install the .NET CLI before installing the package.

Or via Package Manager Console in Visual Studio:

Install-Package Google.Analytics.Data.V1Beta

Why: The NuGet package provides asynchronous service client wrappers and protobuf types for calling the Data API.

Quickstart / Usage

using System;
using System.Threading.Tasks;
using Google.Analytics.Data.V1Beta;

class Program
{
    static async Task Main()
    {
        // Initialize client. Uses Application Default Credentials.
        BetaAnalyticsDataClient client = await BetaAnalyticsDataClient.CreateAsync();

        RunReportRequest request = new RunReportRequest
        {
            Property = "properties/1234567",
            Dimensions = { new Dimension { Name = "city" } },
            Metrics = { new Metric { Name = "activeUsers" } },
            DateRanges = { new DateRange { StartDate = "2026-05-01", EndDate = "today" } }
        };

        RunReportResponse response = await client.RunReportAsync(request);
        foreach (Row row in response.Rows)
        {
            Console.WriteLine($"{row.DimensionValues[0].Value}, {row.MetricValues[0].Value}");
        }
    }
}

Source: SKILL.md on GitHub

No alerts10d3 checks · Risk SAFE
  • Gen Agent Trust Hub10d

    This skill provides a standard interface for interacting with the Google Analytics Data API v1beta across multiple programming languages. It includes established procedures for API enablement, authentication via the Google Cloud CLI, and client library installation. While the skill processes data from an external API, this is consistent with its intended reporting functionality and uses official vendor resources.

  • 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-data-api-basics