摘要:本文提供 Google Analytics 管理 API 1.0 版的概略總覽。
簡介
Google Analytics Admin API 可讓您以程式輔助方式存取 Google Analytics 設定資料,且僅適用於 Google Analytics 資源。進一步瞭解 Google Analytics 資源。
您可以使用 Google Analytics Admin API 執行下列操作:
- 佈建新帳戶。
- 管理帳戶。
- 管理資料共用設定。
- 列出帳戶摘要。
- 搜尋變更記錄事件。
- 管理資源。
- 管理子資源。
- 確認使用者資料收集聲明。
- 管理資源的資料保留設定。
- 管理資源的 Google 信號設定 (Alpha 版)。
- 管理串流。
- 管理 Measurement Protocol 密鑰。
- 管理 SKAdNetwork 轉換價值結構定義 (Alpha 版)。
- 為網站資料串流 (Alpha 版) 產生 Google 代碼片段。
- 管理重要事件。
- 管理轉換事件 (已淘汰)。
- 管理事件建立規則 (Alpha 版)
- 管理活動編輯規則 (Alpha 版)
- 管理自訂維度。
- 管理自訂指標。
- 管理 Google Analytics 資源和 Firebase 專案之間的連結。
- 管理 Google Analytics 資源和 Google Ads 帳戶之間的連結。
- 管理 Google Analytics 資源與 Display & Video 360 廣告主之間的連結提案 (Alpha 版)。
- 管理 Google Analytics 資源與 Display & Video 360 廣告主之間的連結 (Alpha 版)。
- 管理 Google Analytics 資源和 Search Ads 360 之間的連結 (Alpha 版)。
- 管理 Google Analytics 資源與 BigQuery 專案之間的連結 (Alpha 版)。
- 管理帳戶階層和 Google Analytics 資源的使用者權限 (Alpha 版)。
- 產生資料存取報表。
- 管理目標對象 (Alpha 版)。
- 管理展開資料集 (Alpha 版)。
- 管理自動 Google Analytics 設定程序停用設定 (Alpha 版)。
可用的方法
以下是可用的方法。
帳戶佈建
這個方法會傳回應納入服務條款 (TOS) 網址的 accountTicketId 欄位:
https://analytics.google.com/analytics/web/?provisioningSignup=false#/termsofservice/ACCOUNT_TICKET_ID
使用者造訪服務條款網址並接受服務條款後,Google Analytics 帳戶就會建立完成。請參閱帳戶佈建範例。
帳戶管理
管理資料共用設定
列出帳戶摘要
搜尋變更記錄事件
管理房源
子資源管理 (Alpha 版)
使用者資料收集確認聲明
管理資料保留設定
管理 Google 信號設定 (Alpha 版)
管理資料串流
properties.dataStreams.createproperties.dataStreams.getproperties.dataStreams.listproperties.dataStreams.patchproperties.dataStreams.delete
管理 Measurement Protocol 密鑰
properties.dataStreams.measurementProtocolSecrets.createproperties.dataStreams.measurementProtocolSecrets.getproperties.dataStreams.measurementProtocolSecrets.patchproperties.dataStreams.measurementProtocolSecrets.listproperties.dataStreams.measurementProtocolSecrets.delete
SKAdNetwork 轉換價值結構定義管理 (Alpha 版)
properties.dataStreams.sKAdNetworkConversionValueSchema.getproperties.dataStreams.sKAdNetworkConversionValueSchema.createproperties.dataStreams.sKAdNetworkConversionValueSchema.deleteproperties.dataStreams.sKAdNetworkConversionValueSchema.updateproperties.dataStreams.sKAdNetworkConversionValueSchema.list
管理重要事件
properties.keyEvents.createproperties.keyEvents.getproperties.keyEvents.listproperties.keyEvents.deleteproperties.keyEvents.patch
管理轉換事件
properties.conversionEvents.createproperties.conversionEvents.getproperties.conversionEvents.listproperties.conversionEvents.deleteproperties.conversionEvents.patch
管理事件建立規則 (Alpha 版)
properties.dataStreams.eventCreateRules.createproperties.dataStreams.eventCreateRules.getproperties.dataStreams.eventCreateRules.listproperties.dataStreams.eventCreateRules.deleteproperties.dataStreams.eventCreateRules.patch
管理事件編輯規則 (Alpha 版)
properties.dataStreams.eventEditRules.createproperties.dataStreams.eventEditRules.getproperties.dataStreams.eventEditRules.listproperties.dataStreams.eventEditRules.deleteproperties.dataStreams.eventEditRules.patchproperties.dataStreams.eventEditRules.reorder
管理自訂維度
properties.customDimensions.createproperties.customDimensions.getproperties.customDimensions.listproperties.customDimensions.patchproperties.customDimensions.archive
管理自訂指標
properties.customMetrics.createproperties.customMetrics.getproperties.customMetrics.listproperties.customMetrics.patchproperties.customMetrics.archive
連結 Firebase 專案
Google Ads 帳戶連結
properties.googleAdsLinks.createproperties.googleAdsLinks.listproperties.googleAdsLinks.patchproperties.googleAdsLinks.delete
產生 Google 代碼 (Alpha 版)
Google Analytics 資源和 Display & Video 360 廣告主之間的連結提案 (Alpha 版)
properties.displayVideo360AdvertiserLinkProposals.createproperties.displayVideo360AdvertiserLinkProposals.approveproperties.displayVideo360AdvertiserLinkProposals.cancelproperties.displayVideo360AdvertiserLinkProposals.listproperties.displayVideo360AdvertiserLinkProposals.getproperties.displayVideo360AdvertiserLinkProposals.delete
連結 Display & Video 360 廣告主帳戶 (Alpha 版)
properties.displayVideo360AdvertiserLinks.createproperties.displayVideo360AdvertiserLinks.getproperties.displayVideo360AdvertiserLinks.listproperties.displayVideo360AdvertiserLinks.deleteproperties.displayVideo360AdvertiserLinks.patch
連結 Search Ads 360 帳戶 (Alpha 版)
properties.searchAds360Links.createproperties.searchAds360Links.deleteproperties.searchAds360Links.patchproperties.searchAds360Links.listproperties.searchAds360Links.get
進一步瞭解如何為 Google Analytics 資源設定 Analytics 與 Search Ads 360 的整合作業。
連結 BigQuery 帳戶 (Alpha 版)
properties.bigQueryLinks.createproperties.bigQueryLinks.deleteproperties.bigQueryLinks.getproperties.bigQueryLinks.listproperties.bigQueryLinks.patch
進一步瞭解如何為 Google Analytics 資源設定 BigQuery Export。
管理使用者權限 (Alpha 版)
accounts.accessBindings.createaccounts.accessBindings.deleteaccounts.accessBindings.patchaccounts.accessBindings.listaccounts.accessBindings.getaccounts.accessBindings.batchCreateaccounts.accessBindings.batchDeleteaccounts.accessBindings.batchUpdateaccounts.accessBindings.batchGetproperties.accessBindings.createproperties.accessBindings.deleteproperties.accessBindings.patchproperties.accessBindings.listproperties.accessBindings.getproperties.accessBindings.batchCreateproperties.accessBindings.batchDeleteproperties.accessBindings.batchUpdateproperties.accessBindings.batchGet
資料存取權報告
如要進一步瞭解這項功能,請參閱資料存取報表指南。
目標對象管理 (Alpha 版)
properties.audiences.createproperties.audiences.archiveproperties.audiences.patchproperties.audiences.listproperties.audiences.get
進一步瞭解 Google Analytics 中的目標對象。
管理展開資料集 (Alpha 版)
properties.expandedDataSets.createproperties.expandedDataSets.deleteproperties.expandedDataSets.patchproperties.expandedDataSets.listproperties.expandedDataSets.get
進一步瞭解 Google Analytics 360 的展開資料集。
停用自動 Google Analytics 設定程序 (Alpha 版)
進一步瞭解如何管理通用 Analytics 資源自動 Google Analytics 設定程序的停用狀態。