ลองใช้เซิร์ฟเวอร์ MCP สำหรับ Google Analytics ติดตั้งจาก
GitHub และดูรายละเอียดเพิ่มเติมได้ที่
ประกาศ
Method: properties.updateAttributionSettings
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
อัปเดตการตั้งค่าการระบุแหล่งที่มาในพร็อพเพอร์ตี้
คำขอ HTTP
PATCH https://analyticsadmin.googleapis.com/v1alpha/{attributionSettings.name=properties/*/attributionSettings}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
attributionSettings.name |
string
เอาต์พุตเท่านั้น ชื่อทรัพยากรของทรัพยากรการตั้งค่าการระบุแหล่งที่มานี้ รูปแบบ: พร็อพเพอร์ตี้/{property_id}/attributionSettings เช่น "properties/1000/attributionSettings"
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
updateMask |
string (FieldMask format)
ต้องระบุ รายการช่องที่จะอัปเดต ชื่อช่องต้องใส่ตัวพิมพ์เล็กหรือใหญ่ (เช่น "field_to_update") ระบบจะไม่อัปเดตช่องที่ละเว้น หากต้องการแทนที่เอนทิตีทั้งหมด ให้ใช้เส้นทาง 1 เส้นทางที่มีสตริง "*" เพื่อจับคู่กับทุกช่อง ซึ่งเป็นรายการชื่อฟิลด์ที่สมบูรณ์ในตัวเองซึ่งคั่นด้วยคอมมา ตัวอย่าง: "user.displayName,photo"
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ AttributionSettings
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ AttributionSettings
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
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\u003eThis page explains how to update attribution settings on a Google Analytics property using the \u003ccode\u003ePATCH\u003c/code\u003e HTTP request.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires specifying the \u003ccode\u003eattributionSettings.name\u003c/code\u003e as a path parameter and an \u003ccode\u003eupdateMask\u003c/code\u003e as a query parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain the updated AttributionSettings object, and a successful response will return the updated AttributionSettings object.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need the \u003ccode\u003eanalytics.edit\u003c/code\u003e OAuth scope to authorize this request.\u003c/p\u003e\n"]]],["This API updates attribution settings for a specified property using a PATCH request. The request URL includes a path parameter, `attributionSettings.name`, to identify the target property. A required query parameter, `updateMask`, specifies the fields to modify. The request and response bodies both use the `AttributionSettings` resource. Authorization requires the `https://www.googleapis.com/auth/analytics.edit` OAuth scope. The URL format follows gRPC Transcoding syntax.\n"],null,["- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdates attribution settings on a property.\n\nHTTP request\n\n`PATCH https://analyticsadmin.googleapis.com/v1alpha/{attributionSettings.name=properties/*/attributionSettings}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `attributionSettings.name` | `string` Output only. Resource name of this attribution settings resource. Format: properties/{property_id}/attributionSettings Example: \"properties/1000/attributionSettings\" |\n\nQuery parameters\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"\\*\" to match all fields. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\nRequest body\n\nThe request body contains an instance of [AttributionSettings](/analytics/devguides/config/admin/v1/rest/v1alpha/AttributionSettings).\n\nResponse body\n\nIf successful, the response body contains an instance of [AttributionSettings](/analytics/devguides/config/admin/v1/rest/v1alpha/AttributionSettings).\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/analytics.edit`"]]