Google

Google Analytics Admin API

Manage properties in Google Analytics. Warning: Creating multiple Customer Applications, Accounts, or Projects to simulate or act as a single Customer…

Data & analytics#openapi#analytics#media

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Manage properties in Google Analytics. Warning: Creating multiple Customer Applications, Accounts, or Projects to simulate or act as a single Customer Application, Account, or Project (respectively) or to circumvent Service-specific usage limits or quotas is a direct violation of Google Cloud Platform Terms of Service as well as Google APIs Terms of Service. These actions can result in immediate termination of your GCP project(s) without any warning.

Endpoints 28

accountSummaries

  • GETReturns summaries of all accounts accessible by the caller./v1beta/accountSummaries?pageSize=0&pageToken=stringReturns summaries of all accounts accessible by the caller.

properties.keyEvents

  • GETRetrieves a single Key Event./v1beta/:nameRetrieves a single Key Event.
  • DELETEDeletes a Key Event./v1beta/:nameDeletes a Key Event.
  • PATCHUpdates a Key Event./v1beta/:name?updateMask=stringUpdates a Key Event.
  • GETReturns a list of Key Events in the specified parent property/v1beta/:parent/keyEvents?pageSize=0&pageToken=stringReturns a list of Key Events in the specified parent property. Returns an empty list if no Key Events are found.
  • POSTCreates a Key Event./v1beta/:parent/keyEventsCreates a Key Event.

accounts

  • GETReturns all accounts accessible by the caller/v1beta/accounts?pageSize=0&pageToken=string&showDeleted=trueReturns all accounts accessible by the caller. Note that these accounts might not currently have GA properties. Soft-deleted (ie: "trashed") accounts are…
  • POSTRequests a ticket for creating an account./v1beta/accounts:provisionAccountTicketRequests a ticket for creating an account.
  • POSTSearches through all changes to an account or its children given the specified set of filters/v1beta/:account:searchChangeHistoryEventsSearches through all changes to an account or its children given the specified set of filters. Only returns the subset of changes supported by the API. The UI…

properties

  • POSTReturns a customized report of data access records/v1beta/:entity:runAccessReportReturns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are…
  • POSTAcknowledges the terms of user data collection for the specified property/v1beta/:property:acknowledgeUserDataCollectionAcknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or…
  • GETReturns child Properties under the specified parent Account/v1beta/properties?filter=string&pageSize=0&pageToken=string&showDeleted=trueReturns child Properties under the specified parent Account. Properties will be excluded if the caller does not have access. Soft-deleted (ie: "trashed")…
  • POSTCreates a Google Analytics property with the specified location and attributes./v1beta/propertiesCreates a Google Analytics property with the specified location and attributes.

properties.conversionEvents

  • GETDeprecated: Use `ListKeyEvents` instead/v1beta/:parent/conversionEvents?pageSize=0&pageToken=stringDeprecated: Use ListKeyEvents instead. Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are…
  • POSTDeprecated: Use `CreateKeyEvent` instead/v1beta/:parent/conversionEventsDeprecated: Use CreateKeyEvent instead. Creates a conversion event with the specified attributes.

properties.customMetrics

  • POSTArchives a CustomMetric on a property./v1beta/:name:archiveArchives a CustomMetric on a property.
  • GETLists CustomMetrics on a property./v1beta/:parent/customMetrics?pageSize=0&pageToken=stringLists CustomMetrics on a property.
  • POSTCreates a CustomMetric./v1beta/:parent/customMetricsCreates a CustomMetric.

properties.customDimensions

  • GETLists CustomDimensions on a property./v1beta/:parent/customDimensions?pageSize=0&pageToken=stringLists CustomDimensions on a property.
  • POSTCreates a CustomDimension/v1beta/:parent/customDimensionsCreates a CustomDimension. Warning: It's not permissible to use this method to collect data on individual users. In particular, sending user IDs in custom…

properties.dataStreams

  • GETLists DataStreams on a property./v1beta/:parent/dataStreams?pageSize=0&pageToken=stringLists DataStreams on a property.
  • POSTCreates a DataStream./v1beta/:parent/dataStreamsCreates a DataStream.

properties.dataStreams.measurementProtocolSecrets

  • GETReturns child MeasurementProtocolSecrets under the specified parent Property./v1beta/:parent/measurementProtocolSecrets?pageSize=0&pageToken=stringReturns child MeasurementProtocolSecrets under the specified parent Property.
  • POSTCreates a measurement protocol secret./v1beta/:parent/measurementProtocolSecretsCreates a measurement protocol secret.

properties.firebaseLinks

  • GETLists FirebaseLinks on a property/v1beta/:parent/firebaseLinks?pageSize=0&pageToken=stringLists FirebaseLinks on a property. Properties can have at most one FirebaseLink.
  • POSTCreates a FirebaseLink/v1beta/:parent/firebaseLinksCreates a FirebaseLink. Properties can have at most one FirebaseLink.

properties.googleAdsLinks

  • GETLists GoogleAdsLinks on a property./v1beta/:parent/googleAdsLinks?pageSize=0&pageToken=stringLists GoogleAdsLinks on a property.
  • POSTCreates a GoogleAdsLink./v1beta/:parent/googleAdsLinksCreates a GoogleAdsLink.

API details

Base URL
https://analyticsadmin.googleapis.com
Authentication
OAuth 2.0 (authorization code flow) with 2 scopes
An API key in the key query parameter
Operations
28 operations on 17 pathsPOST 14GET 12PATCH 1DELETE 1
Main resources
properties.keyEvents 5properties 4accounts 3properties.customMetrics 3properties.conversionEvents 2properties.customDimensions 2properties.dataStreams 2properties.dataStreams.measurementProtocolSecrets 2properties.firebaseLinks 2properties.googleAdsLinks 2
Response formats
application/json
Description format
Google API Discovery, API version v1beta

How to test the Google Analytics Admin API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Google Analytics Admin API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 2 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Returns summaries of all accounts accessible by the caller.” (GET /v1beta/accountSummaries?pageSize=0&pageToken=string), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Google Analytics Admin API?

Manage properties in Google Analytics. Warning: Creating multiple Customer Applications, Accounts, or Projects to simulate or act as a single Customer… It is listed under Data & analytics and has 28 endpoints.

Who publishes the Google Analytics Admin API?

It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Google Analytics Admin API?

Requests go to https://analyticsadmin.googleapis.com. Endpoint paths are added to this base URL.

How do I authenticate with the Google Analytics Admin API?

It accepts 2 methods: OAuth 2.0 (authorization code flow) with 2 scopes; an API key in the key query parameter.

How many endpoints does the Google Analytics Admin API have?

28 operations on 17 paths (14 POST, 12 GET, 1 PATCH, 1 DELETE). The largest groups are properties.keyEvents, properties, accounts, properties.customMetrics.

Is forking the Google Analytics Admin API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.