Hãy thử máy chủ MCP cho Google Analytics. Cài đặt từ
GitHub và xem
thông báo để biết thêm thông tin chi tiết.
Method: accounts.getDataSharingSettings
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Xem chế độ cài đặt cách chia sẻ dữ liệu trên một tài khoản. Chế độ cài đặt cách chia sẻ dữ liệu là singleton.
Yêu cầu HTTP
GET https://analyticsadmin.googleapis.com/v1beta/{name=accounts/*/dataSharingSettings}
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
name |
string
Bắt buộc. Tên của chế độ cài đặt cần tra cứu. Định dạng: accounts/{account}/dataSharingSettings Ví dụ: accounts/1000/dataSharingSettings
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Thông báo tài nguyên thể hiện chế độ cài đặt cách chia sẻ dữ liệu của một tài khoản Google Analytics.
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"name": string,
"sharingWithGoogleSupportEnabled": boolean,
"sharingWithGoogleAssignedSalesEnabled": boolean,
"sharingWithGoogleAnySalesEnabled": boolean,
"sharingWithGoogleProductsEnabled": boolean,
"sharingWithOthersEnabled": boolean
} |
Trường |
name |
string
Chỉ có đầu ra. Tên tài nguyên. Định dạng: accounts/{account}/dataSharingSettings Ví dụ: "accounts/1000/dataSharingSettings"
|
sharingWithGoogleSupportEnabled |
boolean
Cho phép người đại diện hỗ trợ kỹ thuật của Google truy cập vào dữ liệu và tài khoản Google Analytics của bạn khi cần thiết để cung cấp dịch vụ và tìm giải pháp cho các vấn đề kỹ thuật. Trường này liên kết với trường "Hỗ trợ kỹ thuật" trong giao diện người dùng Quản trị của Google Analytics.
|
sharingWithGoogleAssignedSalesEnabled |
boolean
Cho phép Google truy cập vào dữ liệu tài khoản Google Analytics của bạn, bao gồm cả dữ liệu về mức sử dụng, cấu hình, mức chi tiêu cho sản phẩm của tài khoản và những người dùng có liên kết với tài khoản Google Analytics của bạn, để Google có thể giúp bạn khai thác tối đa các sản phẩm của Google, cung cấp cho bạn thông tin chi tiết, ưu đãi, đề xuất và mẹo tối ưu hoá trên Google Analytics cũng như các sản phẩm khác của Google dành cho doanh nghiệp. Trường này liên kết đến trường "Đề xuất cho doanh nghiệp của bạn" trong Giao diện người dùng quản trị của Google Analytics.
|
sharingWithGoogleAnySalesEnabled (deprecated) |
boolean
Không dùng nữa. Trường này không còn được sử dụng và luôn trả về giá trị false.
|
sharingWithGoogleProductsEnabled |
boolean
Cho phép Google sử dụng dữ liệu để cải thiện các sản phẩm hoặc dịch vụ khác của Google. Trường này liên kết với trường "Sản phẩm và dịch vụ của Google" trong Giao diện người dùng quản trị của Google Analytics.
|
sharingWithOthersEnabled |
boolean
Bật các tính năng như thông tin dự đoán, dữ liệu được mô hình hoá và dịch vụ đo điểm chuẩn để có thông tin chi tiết phong phú hơn về doanh nghiệp khi bạn đóng góp dữ liệu đo lường tổng hợp. Dữ liệu mà bạn chia sẻ (bao gồm cả thông tin về tài sản chứa dữ liệu được chia sẻ) sẽ được tổng hợp và loại bỏ thông tin nhận dạng trước khi được dùng để tạo thông tin chi tiết về doanh nghiệp. Trường này liên kết với trường "Lập mô hình cho nội dung đóng góp và thông tin chi tiết về doanh nghiệp" trong Giao diện người dùng quản trị của Google Analytics.
|
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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`"]]