本文介绍了跟踪目录产品展示次数 - 增强型电子商务 Google Analytics的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 在电子商务目录页面上实现产品展示谷歌分析增强电子商务跟踪.

I'm trying to implement product impressions on a ecommerce catalog page using google analytics enhanced ecommerce tracking.

遵循规范应该像这样实现它:

Following the specs one should implement it like this:

ga('create', 'UA-XXXXX-Y');
ga('require', 'ec');

ga('ec:addImpression', {
  'id': 'P12345',                   // Product details are provided in an impressionFieldObject.
  'name': 'Android Warhol T-Shirt',
  'category': 'Apparel/T-Shirts',
  'brand': 'Google',
  'variant': 'black',
  'list': 'Search Results',
  'position': 1                     // 'position' indicates the product position in the list.
});

ga('ec:addImpression', {
  'id': 'P67890',
  'name': 'YouTube Organic T-Shirt',
  'type': 'view',
  'category': 'Apparel/T-Shirts',
  'brand': , 'YouTube',
  'variant': 'gray',
  'list': 'Search Results',
  'position': 2
});

ga('send', 'pageview');              // Send product impressions with initial pageview.

尽管规范显示了跟踪浏览量事件.为了发送真实的印象,我想在用户向下滚动时触发信标.为此,我通过延迟加载器"触发了该事件,该加载器使用事件 'ga(send,impression)' 逐渐加载目录上的图像,但它不起作用,如果我使用其他浏览量事件来执行此操作,我会破坏我在 GA 上的综合浏览量指标.

Although the specs show a track pageview event. In order to send REAL impressions I wanted to trigger the beacon once the user scrolled down. To do that I've triggered the event through a "lazy loader" which loads gradually the images on the catalog using the event 'ga(send, impression)' but it won't work and if I do that with additional pageviews events I would be corrupting my pageviews metric on GA.

有人知道如何解决这个问题吗?

Does anyone have ideas on how to solve that?

推荐答案

来自增强电子商务文档:

注意:电子商务数据只能与现有匹配一起发送,因为例如网页浏览或事件.如果您使用电子商务命令但不发送任何命中,或者命中在电子商务命令之前发送然后不会发送电子商务数据.

改为使用非交互式事件发送:

ga('send', 'event', 'catalog', 'impression', {'nonInteraction': true});

这篇关于跟踪目录产品展示次数 - 增强型电子商务 Google Analytics的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-28 05:07