首页 > 解决方案 > Google Analytics Data API (GA4) - item.variant 维度?

问题描述

因此,ga4-ecommerce 的项目具有“变体”属性:(请参阅https://developers.google.com/tag-manager/ecommerce-ga4

dataLayer.push({
  event: "view_item_list",
  ecommerce: {
   items: [
    {
      item_name: "Triblend Android T-Shirt",       // Name or ID is required.
      item_id: "12345",
      price: 15.25,
      item_brand: "Google",
      item_category: "Apparel",
      item_category2: "Mens",
      item_category3: "Shirts",
      item_category4: "Tshirts",
      item_variant: "Gray",
      item_list_name: "Search Results",
      item_list_id: "SR123",
      index: 1,
      quantity: 1
    },
});

但不知何故,我似乎没有找到 item.variant 的维度。几乎所有其他道具都在 API 架构中由其自己的维度表示: https ://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions

这是设计使然,我可以以某种方式检索基于变体的聚合指标吗?

我想检索聚合数据以查看每个 itemVariant(我缺少的维度?)生成了多少 itemViews(指标)。

标签: google-analyticsgoogle-analytics-apigoogle-analytics-4google-analytics-data-api

解决方案


There is not a way to retrieve the itemVariant dimension in the GA4 Data API. The dimensions from the item array are prefixed with the string item in the API Dimensions & Metrics list.

The GA4 Data API presents most of the dimensions available in the GA4 UI; an Item Variant dimension is also not available in the GA4 UI.


推荐阅读