我需要大规模创建 g4 分析帐户。
我根据docs调用了API :
apiClient.request({
method: "POST",
url: "https://analyticsadmin.googleapis.com/v1alpha/accounts:provisionAccountTicket",
data: {
account: {
displayName: "Test Account",
regionCode: "US",
},
redirectUri: "https://my-redirect-url",
},
}),
我得到了这样的回复:
{ accountTicketId: "4iR-Ogm8RDSMoV3lQpjZjQ" }
我该如何继续? 下一步是什么?
最佳答案
This method returns the accountTicketId field that should be included in the Terms of Service (TOS) URL:
https://analytics.google.com/analytics/web/?provisioningSignup=false#/termsofservice/ACCOUNT_TICKET_ID
. Once a user visits the TOS URL and accepts the Terms of Service, creation of a Google Analytics account will be complete (Account provisioning sample).
因此下一步是让用户访问列出的页面并批准 TOS。
关于google-analytics-api - 通过 google Analytics v4 admin API 创建帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73010837/