Essayez le serveur MCP pour Google Analytics. Installez-le depuis
GitHub et consultez l'
annonce pour en savoir plus.
Method: accounts.getDataSharingSettings
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Obtenir les paramètres de partage des données d'un compte Les paramètres de partage des données sont des singleton.
Requête HTTP
GET https://analyticsadmin.googleapis.com/v1beta/{name=accounts/*/dataSharingSettings}
L'URL utilise la syntaxe de transcodage gRPC.
Paramètres de chemin d'accès
Paramètres |
name |
string
Obligatoire. Nom des paramètres à rechercher. Format: accounts/{account}/dataSharingSettings Exemple : accounts/1000/dataSharingSettings
|
Corps de la requête
Le corps de la requête doit être vide.
Corps de la réponse
Message de ressource représentant les paramètres de partage des données d'un compte Google Analytics.
Si la requête aboutit, le corps de la réponse contient des données qui ont la structure suivante :
Représentation JSON |
{
"name": string,
"sharingWithGoogleSupportEnabled": boolean,
"sharingWithGoogleAssignedSalesEnabled": boolean,
"sharingWithGoogleAnySalesEnabled": boolean,
"sharingWithGoogleProductsEnabled": boolean,
"sharingWithOthersEnabled": boolean
} |
Champs |
name |
string
Uniquement en sortie. Nom de la ressource. Format: accounts/{account}/dataSharingSettings Exemple: "accounts/1000/dataSharingSettings"
|
sharingWithGoogleSupportEnabled |
boolean
Autorisez les représentants de l'assistance technique Google à accéder à vos données et à votre compte Google Analytics si nécessaire afin de résoudre les problèmes techniques. Ce champ correspond au champ "Assistance technique" dans l'interface utilisateur Google Analytics "Administration".
|
sharingWithGoogleAssignedSalesEnabled |
boolean
Autorisez Google à accéder aux données de votre compte Google Analytics, y compris aux données d'utilisation et de configuration du compte, aux dépenses liées aux produits et aux utilisateurs associés à votre compte Google Analytics. Google pourra ainsi vous aider à exploiter tout le potentiel de ses produits en vous fournissant des insights, des offres, des recommandations et des conseils d'optimisation dans Google Analytics et d'autres produits Google pour les entreprises. Ce champ correspond au champ "Recommandations pour votre entreprise" dans l'interface utilisateur de l'administrateur Google Analytics.
|
sharingWithGoogleAnySalesEnabled (deprecated) |
boolean
Obsolète. Ce champ n'est plus utilisé et renvoie toujours la valeur "false".
|
sharingWithGoogleProductsEnabled |
boolean
Autorisez Google à utiliser les données pour améliorer d'autres produits ou services Google. Ce champ correspond au champ "Produits et services Google" dans l'UI d'administration de Google Analytics.
|
sharingWithOthersEnabled |
boolean
Activez des fonctionnalités telles que les prédictions, la modélisation et les analyses comparatives qui fournissent des insights métier plus détaillés lorsque vous partagez des données de mesure agrégées. Les données que vous partagez (y compris les informations sur la propriété à partir de laquelle elles sont partagées) sont agrégées et anonymisées avant d'être utilisées pour générer des insights métier. Ce champ correspond au champ "Contributions à la modélisation et insights métier" dans l'interface utilisateur Google Analytics "Administration".
|
Champs d'application des autorisations
Nécessite l'un des champs d'application OAuth suivants :
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[null,null,["Dernière mise à jour le 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`"]]