如何枚举可用作 GA4 媒体资源的个人资料媒体资源 ID?我在文档中没有看到任何 API 端点:https://developers.google.com/analytics/devguides/reporting/data/v1
您可以使用此链接来获取帐户,如果您迭代其中的 account_id,它可以迭代有关属性和 ids 的信息。
service = build('analytics', 'v3', credentials=credentials)
accounts = service.management().accounts().list().execute()
for account in accounts.get('items', []):
account_id = account.get('id')
account_name=account.get('name')
properties = service.management().webproperties().list(
accountId=account_id
).execute()