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.
REST Resource: properties.customDimensions
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.
Tài nguyên: CustomDimension
Định nghĩa cho CustomDimension.
Biểu diễn dưới dạng JSON |
{
"name": string,
"parameterName": string,
"displayName": string,
"description": string,
"scope": enum (DimensionScope ),
"disallowAdsPersonalization": boolean
} |
Trường |
name |
string
Chỉ có đầu ra. Tên tài nguyên cho tài nguyên CustomDimension này. Định dạng: Properties/{property}/customDimensions/{customDimension}
|
parameterName |
string
Bắt buộc. Bất biến. Gắn thẻ tên thông số cho phương diện tuỳ chỉnh này. Nếu đây là phương diện ở phạm vi người dùng, thì đây là tên thuộc tính người dùng. Nếu đây là phương diện ở phạm vi sự kiện, thì đây là tên thông số sự kiện. Nếu đây là phương diện ở phạm vi mặt hàng, thì đây là tên thông số được tìm thấy trong mảng Mặt hàng thương mại điện tử. Chỉ được chứa các ký tự chữ-số và dấu gạch dưới, bắt đầu bằng một chữ cái. Độ dài tối đa là 24 ký tự cho phương diện ở phạm vi người dùng, 40 ký tự cho phương diện ở phạm vi sự kiện.
|
displayName |
string
Bắt buộc. Tên hiển thị cho phương diện tuỳ chỉnh này như được hiển thị trong giao diện người dùng Analytics. Độ dài tối đa là 82 ký tự, gồm cả chữ và số, cộng với dấu cách và dấu gạch dưới bắt đầu bằng một chữ cái. Tên hiển thị cũ do hệ thống tạo có thể chứa dấu ngoặc vuông, nhưng nội dung cập nhật cho trường này sẽ không bao giờ cho phép sử dụng dấu ngoặc vuông.
|
description |
string
Không bắt buộc. Nội dung mô tả cho phương diện tuỳ chỉnh này. Độ dài tối đa 150 ký tự.
|
scope |
enum (DimensionScope )
Bắt buộc. Bất biến. Phạm vi của phương diện này.
|
disallowAdsPersonalization |
boolean
Không bắt buộc. Nếu bạn đặt chính sách này thành true, hãy đặt phương diện này là quảng cáo không được cá nhân hoá và loại trừ phương diện đó khỏi hoạt động cá nhân hoá quảng cáo. Tính năng này hiện chỉ được hỗ trợ bởi các phương diện tuỳ chỉnh ở phạm vi người dùng.
|
DimensionScope
Các giá trị hợp lệ cho phạm vi của phương diện này.
Enum |
DIMENSION_SCOPE_UNSPECIFIED |
Phạm vi không xác định hoặc chưa được chỉ định. |
EVENT |
Phương diện trong phạm vi một sự kiện. |
USER |
Phương diện trong phạm vi người dùng. |
ITEM |
Phương diện dành cho các mặt hàng thương mại điện tử |
Phương thức |
|
Lưu trữ một Phương diện tuỳ chỉnh trên một tài sản. |
|
Tạo một CustomDimension. |
|
Tìm một Phương diện tuỳ chỉnh duy nhất. |
|
Liệt kê các phương diện tuỳ chỉnh trên một thuộc tính. |
|
Cập nhật một Phương diện tuỳ chỉnh trên một tài sản. |
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\u003e\u003ccode\u003eCustomDimension\u003c/code\u003e resource allows defining custom dimensions with specific parameters like name, display name, description, scope, and whether it's excluded from ads personalization.\u003c/p\u003e\n"],["\u003cp\u003eThe scope of a custom dimension can be \u003ccode\u003eEVENT\u003c/code\u003e, \u003ccode\u003eUSER\u003c/code\u003e, or \u003ccode\u003eITEM\u003c/code\u003e, determining the level at which the dimension is applied.\u003c/p\u003e\n"],["\u003cp\u003eYou can manage custom dimensions using methods like \u003ccode\u003ecreate\u003c/code\u003e, \u003ccode\u003eget\u003c/code\u003e, \u003ccode\u003elist\u003c/code\u003e, \u003ccode\u003eupdate\u003c/code\u003e, and \u003ccode\u003earchive\u003c/code\u003e to control their lifecycle within your Google Analytics 4 property.\u003c/p\u003e\n"],["\u003cp\u003eCustom dimensions can be user-scoped, event-scoped or item-scoped, each with specific requirements for the parameter name used.\u003c/p\u003e\n"],["\u003cp\u003eThe JSON representation of a \u003ccode\u003eCustomDimension\u003c/code\u003e includes fields for essential properties, allowing programmatic management of custom dimensions.\u003c/p\u003e\n"]]],["Custom dimensions are defined with properties like `name`, `parameterName`, `displayName`, `description`, `scope`, and `disallowAdsPersonalization`. The `parameterName` is a tagging parameter, while `scope` defines if it's for events, users, or items. Actions include creating, getting, listing, patching, and archiving a custom dimension. The `DimensionScope` can be `EVENT`, `USER`, or `ITEM`. `disallowAdsPersonalization` excludes the dimension from ads personalization and is only supported for user-scoped custom dimensions.\n"],null,["# REST Resource: properties.customDimensions\n\n- [Resource: CustomDimension](#CustomDimension)\n - [JSON representation](#CustomDimension.SCHEMA_REPRESENTATION)\n- [DimensionScope](#DimensionScope)\n- [Methods](#METHODS_SUMMARY)\n\nResource: CustomDimension\n-------------------------\n\nA definition for a CustomDimension.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"parameterName\": string, \"displayName\": string, \"description\": string, \"scope\": enum (/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customDimensions#DimensionScope), \"disallowAdsPersonalization\": boolean } ``` |\n\n| Fields ||\n|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Output only. Resource name for this CustomDimension resource. Format: properties/{property}/customDimensions/{customDimension} |\n| `parameterName` | `string` Required. Immutable. Tagging parameter name for this custom dimension. If this is a user-scoped dimension, then this is the user property name. If this is an event-scoped dimension, then this is the event parameter name. If this is an item-scoped dimension, then this is the parameter name found in the eCommerce items array. May only contain alphanumeric and underscore characters, starting with a letter. Max length of 24 characters for user-scoped dimensions, 40 characters for event-scoped dimensions. |\n| `displayName` | `string` Required. Display name for this custom dimension as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets. |\n| `description` | `string` Optional. Description for this custom dimension. Max length of 150 characters. |\n| `scope` | `enum (`[DimensionScope](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customDimensions#DimensionScope)`)` Required. Immutable. The scope of this dimension. |\n| `disallowAdsPersonalization` | `boolean` Optional. If set to true, sets this dimension as NPA and excludes it from ads personalization. This is currently only supported by user-scoped custom dimensions. |\n\nDimensionScope\n--------------\n\nValid values for the scope of this dimension.\n\n| Enums ||\n|-------------------------------|-------------------------------------|\n| `DIMENSION_SCOPE_UNSPECIFIED` | Scope unknown or not specified. |\n| `EVENT` | Dimension scoped to an event. |\n| `USER` | Dimension scoped to a user. |\n| `ITEM` | Dimension scoped to eCommerce items |\n\n| Methods ------- ||\n|------------------------------------------------------------------------------------------------------|-------------------------------------------|\n| ### [archive](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customDimensions/archive) | Archives a CustomDimension on a property. |\n| ### [create](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customDimensions/create) | Creates a CustomDimension. |\n| ### [get](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customDimensions/get) | Lookup for a single CustomDimension. |\n| ### [list](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customDimensions/list) | Lists CustomDimensions on a property. |\n| ### [patch](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customDimensions/patch) | Updates a CustomDimension on a property. |"]]