试用 Google Analytics 的 MCP 服务器。从
GitHub 安装,并参阅
公告了解详情。
Method: properties.acknowledgeUserDataCollection
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
确认接受指定媒体资源的用户数据收集条款。
必须先在 Google Analytics 界面中或通过此 API 完成确认,然后才能创建 MeasurementProtocolSecret 资源。
HTTP 请求
POST https://analyticsadmin.googleapis.com/v1alpha/{property=properties/*}:acknowledgeUserDataCollection
网址采用 gRPC 转码语法。
路径参数
参数 |
property |
string
必需。要为其确认用户数据收集的媒体资源。
|
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"acknowledgement": string
} |
字段 |
acknowledgement |
string
必需。确认此方法的调用方了解用户数据收集条款。 此字段必须包含以下确切值:“我确认,我已进行了必要的隐私披露声明并获得了最终用户授权,可收集最终用户的数据并进行相关处理,包括将此类数据与 Google Analytics 从我的网站和/或应用媒体资源收集的访问信息相关联。”
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/analytics.edit
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThis API endpoint is used to acknowledge the terms of user data collection for a specified Google Analytics property.\u003c/p\u003e\n"],["\u003cp\u003eAcknowledgement is required before creating MeasurementProtocolSecret resources and involves confirming understanding of data collection and user privacy.\u003c/p\u003e\n"],["\u003cp\u003eThe request must include a specific acknowledgement phrase stating the user understands the implications of data collection and has necessary user consent.\u003c/p\u003e\n"],["\u003cp\u003eThe API uses a POST request to a specific endpoint and includes the property ID in the path.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful acknowledgement, the response body will be empty.\u003c/p\u003e\n"]]],["The core content outlines the process for acknowledging user data collection terms via an API. A `POST` HTTP request to a specific URL is required, including the `property` path parameter. The request body must contain a JSON with the exact `acknowledgement` string confirming understanding of data collection terms. A successful request results in an empty response, requiring `analytics.edit` authorization scope. The acknowledgment must happen to allow resource creation.\n"],null,["# Method: properties.acknowledgeUserDataCollection\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nAcknowledges the terms of user data collection for the specified property.\n\nThis acknowledgement must be completed (either in the Google Analytics UI or through this API) before MeasurementProtocolSecret resources may be created.\n\n### HTTP request\n\n`POST https://analyticsadmin.googleapis.com/v1alpha/{property=properties/*}:acknowledgeUserDataCollection`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------|--------------------------------------------------------------------------------|\n| `property` | `string` Required. The property for which to acknowledge user data collection. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------|\n| ``` { \"acknowledgement\": string } ``` |\n\n| Fields ||\n|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `acknowledgement` | `string` Required. An acknowledgement that the caller of this method understands the terms of user data collection. This field must contain the exact value: \"I acknowledge that I have the necessary privacy disclosures and rights from my end users for the collection and processing of their data, including the association of such data with the visitation information Google Analytics collects from my site and/or app property.\" |\n\n### Response body\n\nIf successful, the response body is empty.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/analytics.edit`"]]