Accounts
class Accounts extends Resource (View source)
The "accounts" collection of methods.
Typical usage is:
$analyticsadminService = new Google\Service\GoogleAnalyticsAdmin(...);
$accounts = $analyticsadminService->accounts;
Methods
Marks target Account as soft-deleted (ie: "trashed") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, AccessBindings) will be permanently purged.
Lookup for a single Account. (accounts.get)
Get data sharing settings on an account. Data sharing settings are singletons. (accounts.getDataSharingSettings)
Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.
Updates an account. (accounts.patch)
Requests a ticket for creating an account. (accounts.provisionAccountTicket)
Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase & Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see searchChangeHistoryEvents. (accounts.runAccessReport)
Searches through all changes to an account or its children given the specified set of filters. (accounts.searchChangeHistoryEvents)
Details
GoogleProtobufEmpty
delete(string $name, array $optParams = [])
Marks target Account as soft-deleted (ie: "trashed") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, AccessBindings) will be permanently purged.
https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found. (accounts.delete)
GoogleAnalyticsAdminV1betaAccount
get(string $name, array $optParams = [])
Lookup for a single Account. (accounts.get)
GoogleAnalyticsAdminV1betaDataSharingSettings
getDataSharingSettings(string $name, array $optParams = [])
Get data sharing settings on an account. Data sharing settings are singletons. (accounts.getDataSharingSettings)
GoogleAnalyticsAdminV1betaListAccountsResponse
listAccounts(array $optParams = [])
Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.
(accounts.listAccounts)
GoogleAnalyticsAdminV1betaAccount
patch(string $name, GoogleAnalyticsAdminV1betaAccount $postBody, array $optParams = [])
Updates an account. (accounts.patch)
GoogleAnalyticsAdminV1betaProvisionAccountTicketResponse
provisionAccountTicket(GoogleAnalyticsAdminV1betaProvisionAccountTicketRequest $postBody, array $optParams = [])
Requests a ticket for creating an account. (accounts.provisionAccountTicket)
GoogleAnalyticsAdminV1betaRunAccessReportResponse
runAccessReport(string $entity, GoogleAnalyticsAdminV1betaRunAccessReportRequest $postBody, array $optParams = [])
Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase & Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see searchChangeHistoryEvents. (accounts.runAccessReport)
GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsResponse
searchChangeHistoryEvents(string $account, GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsRequest $postBody, array $optParams = [])
Searches through all changes to an account or its children given the specified set of filters. (accounts.searchChangeHistoryEvents)