Coba server MCP untuk Google Analytics. Instal dari
GitHub, dan lihat
pengumuman untuk mengetahui detail selengkapnya.
Method: accounts.getDataSharingSettings
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Mendapatkan setelan berbagi data di akun. Setelan berbagi data bersifat singleton.
Permintaan HTTP
GET https://analyticsadmin.googleapis.com/v1alpha/{name=accounts/*/dataSharingSettings}
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
name |
string
Wajib. Nama setelan yang akan dicari. Format: accounts/{account}/dataSharingSettings Contoh: accounts/1000/dataSharingSettings
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Pesan resource yang mewakili setelan berbagi data akun Google Analytics.
Jika berhasil, isi respons memuat data dengan struktur berikut:
Representasi JSON |
{
"name": string,
"sharingWithGoogleSupportEnabled": boolean,
"sharingWithGoogleAssignedSalesEnabled": boolean,
"sharingWithGoogleAnySalesEnabled": boolean,
"sharingWithGoogleProductsEnabled": boolean,
"sharingWithOthersEnabled": boolean
} |
Kolom |
name |
string
Hanya output. Nama resource. Format: accounts/{account}/dataSharingSettings Contoh: "accounts/1000/dataSharingSettings"
|
sharingWithGoogleSupportEnabled |
boolean
Memungkinkan perwakilan dukungan teknis Google mengakses data dan akun Google Analytics Anda jika diperlukan untuk memberikan layanan dan menemukan solusi atas masalah teknis. Kolom ini dipetakan ke kolom "Dukungan teknis" di UI Admin Google Analytics.
|
sharingWithGoogleAssignedSalesEnabled |
boolean
Memberi Google akses ke data akun Google Analytics Anda, termasuk data konfigurasi dan penggunaan akun, pembelanjaan produk, dan pengguna yang terkait dengan akun Google Analytics Anda, sehingga Google dapat membantu Anda mengoptimalkan produk Google, memberi Anda insight, penawaran, rekomendasi, dan tips pengoptimalan di Google Analytics dan produk Google lainnya untuk bisnis. Kolom ini dipetakan ke kolom "Rekomendasi untuk bisnis Anda" di UI Admin Google Analytics.
|
sharingWithGoogleAnySalesEnabled (deprecated) |
boolean
Tidak digunakan lagi. Kolom ini tidak digunakan lagi dan selalu menampilkan salah.
|
sharingWithGoogleProductsEnabled |
boolean
Mengizinkan Google menggunakan data untuk meningkatkan produk atau layanan Google lainnya. Kolom ini dipetakan ke kolom "Produk & layanan Google" di UI Admin Google Analytics.
|
sharingWithOthersEnabled |
boolean
Mengaktifkan fitur seperti prediksi, data sesuai model, dan tolok ukur yang dapat memberi Anda insight bisnis yang lebih beragam saat Anda memberi kontribusi data pengukuran gabungan. Data yang Anda bagikan (termasuk informasi tentang properti asal data tersebut) akan digabungkan dan dide-identifikasi sebelum digunakan untuk menghasilkan insight bisnis. Kolom ini dipetakan ke kolom "Kontribusi pemodelan & insight bisnis" di UI Admin Google Analytics.
|
Cakupan otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[null,null,["Terakhir diperbarui pada 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`"]]