Teste o servidor MCP do Google Analytics. Instale no
GitHub e confira o
anúncio para mais detalhes.
Method: accounts.getDataSharingSettings
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Acessar as configurações de compartilhamento de dados em uma conta. As configurações de compartilhamento de dados são únicas.
Solicitação HTTP
GET https://analyticsadmin.googleapis.com/v1alpha/{name=accounts/*/dataSharingSettings}
O URL usa a sintaxe de transcodificação gRPC.
Parâmetros de caminho
Parâmetros |
name |
string
Obrigatório. O nome das configurações a serem pesquisadas. Formato: accounts/{account}/dataSharingSettings Exemplo: accounts/1000/dataSharingSettings
|
Corpo da solicitação
O corpo da solicitação precisa estar vazio.
Corpo da resposta
Uma mensagem de recurso que representa as configurações de compartilhamento de dados de uma conta do Google Analytics.
Se bem-sucedido, o corpo da resposta incluirá dados com a estrutura a seguir:
Representação JSON |
{
"name": string,
"sharingWithGoogleSupportEnabled": boolean,
"sharingWithGoogleAssignedSalesEnabled": boolean,
"sharingWithGoogleAnySalesEnabled": boolean,
"sharingWithGoogleProductsEnabled": boolean,
"sharingWithOthersEnabled": boolean
} |
Campos |
name |
string
Apenas saída. Nome do recurso. Formato: accounts/{account}/dataSharingSettings Exemplo: "accounts/1000/dataSharingSettings"
|
sharingWithGoogleSupportEnabled |
boolean
Permite que os representantes de suporte técnico do Google acessem seus dados e sua conta do Google Analytics, quando necessário, para prestar serviços e encontrar soluções para questões técnicas. Esse campo é associado ao campo "Suporte técnico" na interface administrativa do Google Analytics.
|
sharingWithGoogleAssignedSalesEnabled |
boolean
Permite que o Google acesse os dados da sua conta do Google Analytics, incluindo dados de configuração e uso da conta, gastos com produtos e usuários associados à sua conta do Google Analytics. Assim, o Google pode ajudar você a aproveitar ao máximo os produtos do Google, oferecendo insights, ofertas, recomendações e dicas de otimização no Google Analytics e em outros produtos do Google para empresas. Esse campo é mapeado para "Recomendações para sua empresa" na interface administrativa do Google Analytics.
|
sharingWithGoogleAnySalesEnabled (deprecated) |
boolean
Obsoleto. Este campo não é mais usado e sempre retorna "false".
|
sharingWithGoogleProductsEnabled |
boolean
Permite que o Google use os dados para melhorar outros produtos ou serviços do Google. Esses campos são associados ao campo "Produtos e serviços do Google" na interface administrativa do Google Analytics.
|
sharingWithOthersEnabled |
boolean
Ative recursos como previsões, dados estimados e comparativos de mercado que oferecem insights mais detalhados sobre negócios quando você contribui com dados agregados de medição. Os dados que você compartilha (incluindo informações sobre a propriedade de origem) são agregados e desidentificados antes de serem usados para gerar insights de negócios. Esse campo é associado ao campo "Contribuições de estimativas e insights de negócios" na interface administrativa do Google Analytics.
|
Escopos de autorização
Requer um dos seguintes escopos do OAuth:
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-07-26 UTC.
[null,null,["Última atualização 2025-07-26 UTC."],[[["\u003cp\u003eGet data sharing settings for a Google Analytics account using an HTTP GET request.\u003c/p\u003e\n"],["\u003cp\u003eThis request requires the account ID as a path parameter and an empty request body.\u003c/p\u003e\n"],["\u003cp\u003eThe response provides a JSON representation of the account's data sharing settings, including various sharing options with Google and others.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is necessary using specific OAuth scopes related to Analytics read or edit permissions.\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/v1alpha/{name=accounts/*/dataSharingSettings}`, where `name` specifies the account. The request body must be empty. The response contains a JSON object with fields such as `name`, and boolean values indicating sharing settings (e.g., `sharingWithGoogleSupportEnabled`). Access requires either `analytics.readonly` or `analytics.edit` OAuth scopes.\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/v1alpha/{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`"]]