ลองใช้เซิร์ฟเวอร์ MCP สำหรับ Google Analytics ติดตั้งจาก
GitHub และดูรายละเอียดเพิ่มเติมได้ที่
ประกาศ
Method: accounts.getDataSharingSettings
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ดูการตั้งค่าการแชร์ข้อมูลในบัญชี การตั้งค่าการแชร์ข้อมูลเป็นแบบเดี่ยว
คำขอ HTTP
GET https://analyticsadmin.googleapis.com/v1alpha/{name=accounts/*/dataSharingSettings}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
name |
string
ต้องระบุ ชื่อการตั้งค่าที่จะค้นหา รูปแบบ: accounts/{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 ของคุณเมื่อจําเป็น เพื่อให้บริการและหาวิธีแก้ไขปัญหาทางเทคนิค ช่องนี้จะแมปกับช่อง "การสนับสนุนด้านเทคนิค" ใน UI ของผู้ดูแลระบบ Google Analytics
|
sharingWithGoogleAssignedSalesEnabled |
boolean
อนุญาตให้ Google เข้าถึงข้อมูลบัญชี Google Analytics ของคุณ ซึ่งรวมถึงข้อมูลการใช้งานและการกำหนดค่าบัญชี ค่าใช้จ่ายในการใช้งานผลิตภัณฑ์ และผู้ใช้ที่เชื่อมโยงกับบัญชี Google Analytics เพื่อให้ Google ช่วยให้คุณได้รับประโยชน์สูงสุดจากผลิตภัณฑ์ของ Google โดยมอบข้อมูลเชิงลึก ข้อเสนอ คำแนะนำ และเคล็ดลับการเพิ่มประสิทธิภาพต่างๆ สำหรับธุรกิจทั้งใน Google Analytics และผลิตภัณฑ์อื่นๆ ของ Google ช่องนี้จะแมปกับช่อง "คําแนะนําสําหรับธุรกิจของคุณ" ใน UI ผู้ดูแลระบบของ Google Analytics
|
sharingWithGoogleAnySalesEnabled (deprecated) |
boolean
เลิกใช้งานแล้ว ช่องนี้ไม่ได้ใช้งานแล้วและจะแสดงผลเป็นเท็จเสมอ
|
sharingWithGoogleProductsEnabled |
boolean
อนุญาตให้ Google ใช้ข้อมูลเพื่อปรับปรุงผลิตภัณฑ์หรือบริการอื่นๆ ของ Google ฟิลด์นี้จะแมปกับฟิลด์ "ผลิตภัณฑ์และบริการของ Google" ใน UI ของผู้ดูแลระบบ Google Analytics
|
sharingWithOthersEnabled |
boolean
เปิดใช้ฟีเจอร์ต่างๆ เช่น การคาดการณ์ ข้อมูลโดยประมาณ และการเปรียบเทียบที่ให้ข้อมูลเชิงลึกทางธุรกิจได้ชัดเจนยิ่งขึ้นเมื่อคุณให้ข้อมูลการวัดผลแบบรวม ข้อมูลที่คุณแชร์ (รวมถึงข้อมูลพร็อพเพอร์ตี้ที่แชร์อยู่) ได้รับการรวบรวมและลบการระบุตัวตนก่อนนำไปใช้สร้างข้อมูลเชิงลึกทางธุรกิจ ช่องนี้จะเชื่อมโยงกับช่อง "การประมาณการมีส่วนร่วมและข้อมูลเชิงลึกทางธุรกิจ" ใน UI ของผู้ดูแลระบบ Google Analytics
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 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`"]]