سرور MCP را برای Google Analytics امتحان کنید. از
GitHub نصب کنید و برای جزئیات بیشتر به
اطلاعیه مراجعه کنید.
Method: accounts.getDataSharingSettings
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
تنظیمات اشتراک گذاری داده را در یک حساب دریافت کنید. تنظیمات به اشتراک گذاری داده ها تک تن هستند.
درخواست HTTP
GET https://analyticsadmin.googleapis.com/v1beta/{name=accounts/*/dataSharingSettings}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
name | string مورد نیاز. نام تنظیماتی که باید جستجو کنید. قالب: حسابها/{account}/dataSharingSettings مثال: accounts/1000/dataSharingSettings |
درخواست بدن
بدنه درخواست باید خالی باشد.
بدن پاسخگو
یک پیام منبع که نشان دهنده تنظیمات اشتراک گذاری داده یک حساب Google Analytics است.
در صورت موفقیت آمیز بودن، بدنه پاسخ حاوی داده هایی با ساختار زیر است:
نمایندگی JSON |
---|
{
"name": string,
"sharingWithGoogleSupportEnabled": boolean,
"sharingWithGoogleAssignedSalesEnabled": boolean,
"sharingWithGoogleAnySalesEnabled": boolean,
"sharingWithGoogleProductsEnabled": boolean,
"sharingWithOthersEnabled": boolean
} |
فیلدها |
---|
name | string فقط خروجی نام منبع قالب: accounts/{account}/dataSharingSettings مثال: "accounts/1000/dataSharingSettings" |
sharingWithGoogleSupportEnabled | boolean به نمایندگان پشتیبانی فنی Google در صورت لزوم برای ارائه خدمات و یافتن راهحل برای مشکلات فنی به دادهها و حساب Google Analytics شما اجازه میدهد. این فیلد به قسمت "پشتیبانی فنی" در رابط کاربری مدیریت گوگل آنالیتیکس نگاشت می شود. |
sharingWithGoogleAssignedSalesEnabled | boolean به Google اجازه میدهد به دادههای حساب Google Analytics شما، از جمله دادههای استفاده و پیکربندی حساب، هزینههای محصول، و کاربران مرتبط با حساب Google Analytics شما دسترسی داشته باشد، تا Google بتواند به شما کمک کند از محصولات Google بهترین استفاده را ببرید و اطلاعات بینش، پیشنهادات، توصیهها و نکات بهینهسازی را در سراسر Google Analytics و سایر محصولات Google برای کسب و کار به شما ارائه دهد. این فیلد به فیلد «توصیههایی برای کسبوکار شما» در رابط کاربری مدیریت Google Analytics منطبق میشود. |
sharingWithGoogleAnySalesEnabled (deprecated) | boolean منسوخ شده است. این فیلد دیگر استفاده نمی شود و همیشه false را برمی گرداند. |
sharingWithGoogleProductsEnabled | boolean به Google اجازه میدهد از دادهها برای بهبود سایر محصولات یا خدمات Google استفاده کند. این قسمت به فیلد «محصولات و خدمات Google» در رابط کاربری مدیریت Google Analytics نشان داده می شود. |
sharingWithOthersEnabled | boolean ویژگیهایی مانند پیشبینیها، دادههای مدلسازیشده، و محکگذاری را فعال کنید که میتوانند هنگام مشارکت دادههای اندازهگیری انبوه، اطلاعات بینش تجاری غنیتری در اختیار شما قرار دهند. دادههایی که به اشتراک میگذارید (از جمله اطلاعات مربوط به ملکی که از آن به اشتراک گذاشته شده است) قبل از استفاده برای ایجاد اطلاعات بینش تجاری، جمعآوری و شناسایی نمیشوند. این فیلد به فیلد «مشارکتهای مدلسازی و بینشهای کسبوکار» در رابط کاربری مدیریت Google Analytics نشان داده میشود. |
محدوده مجوز
به یکی از حوزه های OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/analytics.readonly
-
https://www.googleapis.com/auth/analytics.edit
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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`"]]