简体   繁体   中英

Google Analytics Data API (GA4) - item.variant dimension?

So, ga4-ecommerce has the property "variant" for it's items: (see 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
    },
});

But somehow I don't seem to find the dimension for item.variant. Pretty much every other prop is represented by its own dimension in the API-Schema: https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions

Is this by design and I can somehow retrieve aggregated metrics based on variant?

fe I want to retrieve aggregated data to see how much itemViews (metric) each itemVariant (the dimension I'm missing?) generated.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM