Prueba el servidor de MCP para Google Analytics. Instala desde
GitHub y consulta el
anuncio para obtener más detalles.
Method: properties.acknowledgeUserDataCollection
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Reconoce las condiciones de la recopilación de datos del usuario para la propiedad especificada.
Se debe completar esta confirmación (ya sea en la IU de Google Analytics o a través de esta API) antes de que se puedan crear los recursos MeasurementProtocolSecret.
Solicitud HTTP
POST https://analyticsadmin.googleapis.com/v1beta/{property=properties/*}:acknowledgeUserDataCollection
La URL usa la sintaxis de la transcodificación gRPC.
Parámetros de ruta de acceso
Parámetros |
property |
string
Obligatorio. La propiedad para la que se confirma la recopilación de datos del usuario.
|
Cuerpo de la solicitud
El cuerpo de la solicitud contiene datos con la siguiente estructura:
Representación JSON |
{
"acknowledgement": string
} |
Campos |
acknowledgement |
string
Obligatorio. Una confirmación de que el llamador de este método comprende las condiciones de la recopilación de datos del usuario. Este campo debe contener el valor exacto: "Reconozco que poseo las divulgaciones de privacidad y los derechos necesarios de mis usuarios finales para la recopilación y el procesamiento de sus datos, incluida la asociación de tales datos con la información de visitas que Google Analytics recopila de mi sitio o propiedad de la aplicación".
|
Cuerpo de la respuesta
Si se ejecuta correctamente, el cuerpo de la respuesta está vacío.
Alcances de autorización
Requiere el siguiente alcance de OAuth:
https://www.googleapis.com/auth/analytics.edit
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-26 (UTC)
[null,null,["Última actualización: 2025-07-26 (UTC)"],[[["\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`"]]