Prueba el servidor de MCP para Google Analytics. Instala desde
GitHub y consulta el
anuncio para obtener más detalles.
Method: accounts.getDataSharingSettings
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Obtener la configuración de uso compartido de datos en una cuenta La configuración de uso compartido de datos es singleton.
Solicitud HTTP
GET https://analyticsadmin.googleapis.com/v1beta/{name=accounts/*/dataSharingSettings}
La URL usa la sintaxis de la transcodificación gRPC.
Parámetros de ruta de acceso
Parámetros |
name |
string
Obligatorio. Es el nombre del parámetro de configuración que se buscará. Formato: accounts/{account}/dataSharingSettings Ejemplo: accounts/1000/dataSharingSettings
|
Cuerpo de la solicitud
El cuerpo de la solicitud debe estar vacío.
Cuerpo de la respuesta
Es un mensaje de recurso que representa la configuración de uso compartido de datos de una cuenta de Google Analytics.
Si se ejecuta correctamente, el cuerpo de la respuesta contendrá datos con la siguiente estructura:
Representación JSON |
{
"name": string,
"sharingWithGoogleSupportEnabled": boolean,
"sharingWithGoogleAssignedSalesEnabled": boolean,
"sharingWithGoogleAnySalesEnabled": boolean,
"sharingWithGoogleProductsEnabled": boolean,
"sharingWithOthersEnabled": boolean
} |
Campos |
name |
string
Solo salida. Es el nombre del recurso. Formato: accounts/{account}/dataSharingSettings Ejemplo: "accounts/1000/dataSharingSettings"
|
sharingWithGoogleSupportEnabled |
boolean
Permite que los representantes de asistencia técnica de Google accedan a tu cuenta y datos de Google Analytics cuando sea necesario para proporcionarte ayuda y encontrar soluciones a problemas técnicos. Este campo se asigna al campo "Asistencia técnica" en la IU del Administrador de Google Analytics.
|
sharingWithGoogleAssignedSalesEnabled |
boolean
Permite que Google acceda a los datos de tu cuenta de Google Analytics, incluidos los datos de uso y configuración de la cuenta, la inversión en productos y los usuarios asociados con tu cuenta de Google Analytics, para que Google pueda ayudarte a aprovechar al máximo los productos de Google, así como brindarte estadísticas, ofertas, recomendaciones y sugerencias de optimización en Google Analytics y otros productos para empresas de Google. Este campo se asigna al campo "Recomendaciones para tu empresa" en la IU del Administrador de Google Analytics.
|
sharingWithGoogleAnySalesEnabled (deprecated) |
boolean
Obsoleta. Este campo ya no se usa y siempre muestra un valor falso.
|
sharingWithGoogleProductsEnabled |
boolean
Permite que Google use los datos para mejorar otros productos o servicios de Google. Este campo se asigna al campo "Productos y servicios de Google" en la IU del Administrador de Google Analytics.
|
sharingWithOthersEnabled |
boolean
Habilita funciones como las predicciones, los datos modelados y las comparativas que pueden proporcionarte estadísticas empresariales más completas cuando aportes datos de medición agregados. Los datos que compartes (incluida la información sobre la propiedad desde la que se comparten) se agregan y desidentifican antes de usarse para generar estadísticas empresariales. Este campo se asigna al campo "Contribuciones al modelado y estadísticas empresariales" en la IU del Administrador de Google Analytics.
|
Permisos de autorización
Se necesita uno de los siguientes permisos de OAuth:
https://www.googleapis.com/auth/analytics.readonly
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\u003eRetrieve data sharing settings for a Google Analytics account using a \u003ccode\u003eGET\u003c/code\u003e request to the specified endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThese settings control data sharing with Google support, sales teams, products, and others, and are configured at the account level.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes details on whether data sharing is enabled for various Google services and external parties.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific OAuth scopes for read or edit access to analytics data.\u003c/p\u003e\n"]]],["This document details how to retrieve data sharing settings for a Google Analytics account. A `GET` request is sent to `https://analyticsadmin.googleapis.com/v1beta/{name=accounts/*/dataSharingSettings}`, where `name` specifies the account. The request body must be empty. The response includes data sharing settings, represented in JSON format, with fields like `sharingWithGoogleSupportEnabled`, indicating whether the sharing of data is enabled for various Google support teams. This operation needs specific OAuth scopes, either `analytics.readonly` or `analytics.edit`.\n"],null,["# Method: accounts.getDataSharingSettings\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.DataSharingSettings.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGet data sharing settings on an account. Data sharing settings are singletons.\n\n### HTTP request\n\n`GET https://analyticsadmin.googleapis.com/v1beta/{name=accounts/*/dataSharingSettings}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|----------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: `accounts/1000/dataSharingSettings` |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nA resource message representing data sharing settings of a Google Analytics account.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"sharingWithGoogleSupportEnabled\": boolean, \"sharingWithGoogleAssignedSalesEnabled\": boolean, \"sharingWithGoogleAnySalesEnabled\": boolean, \"sharingWithGoogleProductsEnabled\": boolean, \"sharingWithOthersEnabled\": boolean } ``` |\n\n| Fields ||\n|-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Output only. Resource name. Format: accounts/{account}/dataSharingSettings Example: \"accounts/1000/dataSharingSettings\" |\n| `sharingWithGoogleSupportEnabled` | `boolean` Allows Google technical support representatives access to your Google Analytics data and account when necessary to provide service and find solutions to technical issues. This field maps to the \"Technical support\" field in the Google Analytics Admin UI. |\n| `sharingWithGoogleAssignedSalesEnabled` | `boolean` Allows Google access to your Google Analytics account data, including account usage and configuration data, product spending, and users associated with your Google Analytics account, so that Google can help you make the most of Google products, providing you with insights, offers, recommendations, and optimization tips across Google Analytics and other Google products for business. This field maps to the \"Recommendations for your business\" field in the Google Analytics Admin UI. |\n| `sharingWithGoogleAnySalesEnabled` **(deprecated)** | `boolean` | This item is deprecated! Deprecated. This field is no longer used and always returns false. |\n| `sharingWithGoogleProductsEnabled` | `boolean` Allows Google to use the data to improve other Google products or services. This fields maps to the \"Google products \\& services\" field in the Google Analytics Admin UI. |\n| `sharingWithOthersEnabled` | `boolean` Enable features like predictions, modeled data, and benchmarking that can provide you with richer business insights when you contribute aggregated measurement data. The data you share (including information about the property from which it is shared) is aggregated and de-identified before being used to generate business insights. This field maps to the \"Modeling contributions \\& business insights\" field in the Google Analytics Admin UI. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/analytics.readonly`\n- `https://www.googleapis.com/auth/analytics.edit`"]]