Analytics Admin Service
The Analytics Admin service allows you to use the Google Analytics Admin API v1
in Apps Script. The Google Analytics Admin API allows for programmatic access
to the Google Analytics 4 (GA4) configuration data and is only compatible with GA4 properties.
Reference
For detailed information on this service, see the Google Analytics Admin API v1.
Like all advanced services in Apps Script, the AnalyticsAdmin service uses the
same objects, methods, and parameters as the public API. For more information,
see How method signatures are determined.
To report issues and find other support, see the
Google Analytics Admin API v1 support page.
Sample code
Run a report
The sample lists all the Google Analytics accounts available to a user by calling
the accounts.list()
method.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-04 UTC.
[null,null,["Last updated 2025-06-04 UTC."],[[["The Analytics Admin service in Apps Script enables programmatic access to Google Analytics 4 (GA4) configuration data using the Google Analytics Admin API v1."],["It is an advanced service that requires enabling before use and is exclusively compatible with GA4 properties."],["This service mirrors the objects, methods, and parameters of the public API, providing consistent functionality."],["Support and issue reporting can be found on the Google Analytics Admin API v1 support page."],["A provided sample code demonstrates listing all Google Analytics accounts accessible to the current user."]]],[]]