google-analytics - 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(指标)。
解决方案
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.
推荐阅读
- r - ggplot: coord_cartesian(clip = "off") and alpha < 1.0 隐藏 geom_lines
- c# - 是否可以为使用 Xamarin.Essentials: Geolocation API 的函数创建单元测试?
- html - 在 overflow-x: auto 中定位绝对 div
- javascript - CSS“预加载”动画
- java - 是否可以完全用 C++ 包装 Java 函数?
- bioinformatics - snakemake:管道因 MissingOutputException 而失败
- ios - 向上滑动以显示打开的应用程序时,iOS 中会显示默认的 Flutter 图标
- django - 将 User 模型的用户名更改为使用 PhoneNumberField 而不是 CharField 会导致错误
- angular - 将值转换为字符串对象以进行属性绑定
- php - 提前退出 Symfony 控制台执行()?