摘要:本文件概略說明 Google Analytics Admin API 1.0 版。
簡介
Google Analytics Admin API 可讓您以程式輔助方式存取 Google Analytics 設定資料,且僅適用於 Google Analytics 資源。進一步瞭解 Google Analytics 資源。
您可以使用 Google Analytics Admin API 執行以下操作:
- 佈建新的帳戶。
- 管理帳戶。
- 管理資料共用設定。
- 列出帳戶摘要。
- 搜尋變更記錄事件。
- 管理資源。
- 管理子資源。
- 確認使用者資料收集聲明。
- 管理資源的資料保留設定。
- 管理資源的 Google 信號設定 (Alpha 版)。
- 管理串流。
- 管理 Measurement Protocol 密鑰。
- 管理 SKAdNetwork 轉換價值結構定義 (Alpha 版)。
- 為網站資料串流產生 Google 代碼程式碼片段 (Alpha 版)。
- 管理重要事件。
- 管理轉換事件 (已淘汰)。
- 管理事件建立規則 (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 設定程序。