Google Analytics Admin API Overview

Summary: This document provides a high level overview of the Google Analytics Admin API Version 1.0.

Introduction

The Google Analytics Admin API allows for programmatic access to the Google Analytics 4 (GA4) configuration data and is only compatible with GA4 properties. Learn more about GA4 properties.

You can use the Google Analytics Admin API to:

Available methods

Account provisioning

  • accounts.provisionAccountTicket

    This method returns the accountTicketId field that should be included in the Terms of Service (TOS) URL: https://analytics.google.com/analytics/web/?provisioningSignup=false#/termsofservice/ACCOUNT_TICKET_ID. Once a user visits the TOS URL and accepts the Terms of Service, creation of a Google Analytics account will be complete (Account provisioning sample).

Account management

Account summaries

User permissions management

Account data sharing settings management

User permission audit

GA4 properties management

Firebase project linking

GA4 data streams management

Global Site Tag generation

Enhanced measurement settings management

Enable the API

Click this button to automatically enable the Google Analytics Admin API:

Enable the Google Analytics Admin API

Quick start guide

Quick start using client libraries

API discovery document

You can query the Google Analytics Admin API discovery document by using the following URL:

https://analyticsadmin.googleapis.com/$discovery/rest?version=v1alpha

Client libraries

See the Quick start guide for examples of using the client libraries.