Try the MCP server for Google Analytics. Install from
GitHub, and see the
announcement for more details.
Method: accounts.getDataSharingSettings
Stay organized with collections
Save and categorize content based on your preferences.
Get data sharing settings on an account. Data sharing settings are singletons.
HTTP request
GET https://analyticsadmin.googleapis.com/v1alpha/{name=accounts/*/dataSharingSettings}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
name |
string
Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: accounts/1000/dataSharingSettings
|
Request body
The request body must be empty.
Response body
A resource message representing data sharing settings of a Google Analytics account.
If successful, the response body contains data with the following structure:
JSON representation |
{
"name": string,
"sharingWithGoogleSupportEnabled": boolean,
"sharingWithGoogleAssignedSalesEnabled": boolean,
"sharingWithGoogleAnySalesEnabled": boolean,
"sharingWithGoogleProductsEnabled": boolean,
"sharingWithOthersEnabled": boolean
} |
Fields |
name |
string
Output only. Resource name. Format: accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings"
|
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.
|
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.
|
sharingWithGoogleAnySalesEnabled (deprecated) |
boolean
Deprecated. This field is no longer used and always returns false.
|
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.
|
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.
|
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-02 UTC.
[null,null,["Last updated 2025-04-02 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`"]]