試用 Google Analytics 的 MCP 伺服器。從
GitHub 安裝,詳情請參閱
公告。
Method: properties.acknowledgeUserDataCollection
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
確認指定資源的使用者資料收集條款。
您必須在 Google Analytics UI 中或透過這個 API 完成這項確認程序,才能建立 MeasurementProtocolSecret 資源。
HTTP 要求
POST https://analyticsadmin.googleapis.com/v1beta/{property=properties/*}:acknowledgeUserDataCollection
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
property |
string
必要欄位。用來確認使用者資料收集的資源。
|
要求主體
要求主體的資料會採用以下結構:
JSON 表示法 |
{
"acknowledgement": string
} |
欄位 |
acknowledgement |
string
必要欄位。此方法的呼叫端瞭解使用者資料收集的條款。 這個欄位必須包含確切值:「本人確認,我已針對收集和處理使用者資料作業提供必要的隱私權揭露聲明並取得使用者授權,這類資料也包括使用者資料與 Google Analytics 從我的網站和/或應用程式資源收集到的造訪資訊所建立的關聯資料。」
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/analytics.edit
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eThis API endpoint acknowledges user data collection for a specified Google Analytics property.\u003c/p\u003e\n"],["\u003cp\u003eIt requires a specific acknowledgement phrase confirming the user's understanding of data collection terms.\u003c/p\u003e\n"],["\u003cp\u003eUsers need the \u003ccode\u003eanalytics.edit\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"],["\u003cp\u003eA successful request results in an empty response body.\u003c/p\u003e\n"],["\u003cp\u003eThe request body includes an \u003ccode\u003eacknowledgement\u003c/code\u003e field containing the required phrase.\u003c/p\u003e\n"]]],["This API endpoint `acknowledgeUserDataCollection` requires a POST HTTP request to acknowledge user data collection for a specified property. The request URL includes a required `property` path parameter. The request body needs a JSON object with an `acknowledgement` field. This field must contain a specific string confirming understanding of data collection terms. Successful requests return an empty response. Authorization requires the `analytics.edit` scope. The action of acknowledgment is required before creating MeasurementProtocolSecret resources.\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/v1beta/{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`"]]