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.
Mảng items trong thương mại điện tử
sự kiện cho phép bạn mô tả các sản phẩm hoặc dịch vụ trên trang web thương mại điện tử của mình.
Google cung cấp danh sách các tham số bắt buộc và nên dùng
để thêm vào mảng items.
Ngoài các thông số này, bạn có thể thêm tối đa 27 thông số tuỳ chỉnh trong
mảng items. Các thông số tuỳ chỉnh này được gọi là ở phạm vi mặt hàng tuỳ chỉnh
tham số để giúp bạn thu thập dữ liệu hữu ích cho
doanh nghiệp của bạn. Trong số 27 thông số mục tuỳ chỉnh này, bạn có thể định cấu hình:
10 phương diện tuỳ chỉnh ở phạm vi mặt hàng cho tài sản chuẩn
25 phương diện tuỳ chỉnh ở phạm vi mặt hàng đối với tài sản Analytics 360
Nhớ kiểm tra danh sách các thông số bắt buộc và được đề xuất trước
tạo thông số tuỳ chỉnh ở phạm vi mặt hàng của riêng bạn.
Thêm thông số tuỳ chỉnh ở phạm vi mặt hàng
Để thêm một thông số tuỳ chỉnh ở phạm vi mặt hàng, hãy thêm thông số đó vào
Mảng items. Ví dụ: để biết một sản phẩm có còn hàng hay không, bạn có thể
thêm thông số tuỳ chỉnh in_stock sau đây vào sự kiện:
Xin lưu ý rằng các bước này áp dụng cho cả gtag.js và Trình quản lý thẻ của Google
thực tế.
Các bước tiếp theo
Để phân tích thông số tuỳ chỉnh ở phạm vi mặt hàng, bạn phải tạo một thông số tuỳ chỉnh ở phạm vi mặt hàng
. Để biết thông tin về cách thiết lập phương diện tuỳ chỉnh ở phạm vi mặt hàng,
xem bài viết Phương diện và chỉ số tuỳ chỉnh.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2024-09-13 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eitems\u003c/code\u003e array in ecommerce events describes products or services, using parameters defined by Google.\u003c/p\u003e\n"],["\u003cp\u003eYou can add up to 27 custom item-scoped parameters to the \u003ccode\u003eitems\u003c/code\u003e array to capture business-specific data.\u003c/p\u003e\n"],["\u003cp\u003eCustom item-scoped parameters can be added directly to the \u003ccode\u003eitems\u003c/code\u003e array within your ecommerce events, like the example showing the \u003ccode\u003ein_stock\u003c/code\u003e parameter.\u003c/p\u003e\n"],["\u003cp\u003eTo analyze item-scoped custom parameters in your reports, you need to create corresponding item-scoped custom dimensions in Google Analytics.\u003c/p\u003e\n"]]],["The `items` array in ecommerce events allows for product/service descriptions, including required and recommended parameters. You can also add up to 27 custom item-scoped parameters, like `in_stock`, within this array. For standard properties, 10 item-scoped custom dimensions are configurable, and 25 for Analytics 360 properties. Adding a custom parameter involves including it in the `items` array. To analyze these parameters, an item-scoped custom dimension needs to be created.\n"],null,["# Create item-scoped custom parameters\n\nThe [`items` array](/analytics/devguides/collection/ga4/ecommerce#implementation) in ecommerce\nevents lets you describe the products or services on your ecommerce website.\nGoogle provides a [list of required and recommended parameters](/analytics/devguides/collection/ga4/reference/events)\nto include in the `items` array.\n\nIn addition to these parameters, you can include up to 27 custom parameters in\nthe `items` array. These custom parameters are called **custom item-scoped\nparameters** and they let you capture data that's useful to your\nbusiness. Of these 27 custom item parameters, you can configure:\n\n- 10 item-scoped custom dimensions for standard properties\n- 25 item-scoped custom dimensions for Analytics 360 properties\n\nMake sure to review the list of required and recommended parameters before\ncreating your own item-scoped custom parameters.\n\nAdd an item-scoped custom parameter\n-----------------------------------\n\nTo add an item-scoped custom parameter, include the parameter in the\n`items` array. For example, to capture whether a product is in stock, you can\nadd the following `in_stock` custom parameter to the event: \n\n items: [\n {\n item_id: \"SKU_12345\",\n item_name: \"Stan and Friends Tee\",\n affiliation: \"Google Merchandise Store\",\n coupon: \"SUMMER_FUN\",\n discount: 2.22,\n index: 0,\n item_brand: \"Google\",\n item_category: \"Apparel\",\n item_category2: \"Adult\",\n item_category3: \"Shirts\",\n item_category4: \"Crew\",\n item_category5: \"Short sleeve\",\n item_list_id: \"related_products\",\n item_list_name: \"Related Products\",\n item_variant: \"green\",\n in_stock: true, // The item-scoped custom parameter \"in_stock\"\n location_id: \"ChIJIQBpAG2ahYAR_6128GcTUEo\",\n price: 10.01,\n quantity: 3\n }\n ]\n\nNote that these steps apply to both gtag.js and Google Tag Manager\nimplementations.\n\nNext steps\n----------\n\nTo analyze item-scoped custom parameters, you must create an item-scoped custom\ndimension. For information about how to set up the item-scoped custom dimension,\nsee [Custom dimensions and metrics](//support.google.com/analytics/answer/10075209)."]]