GA虚拟页面事件-两次ecomrece产品列表点击

时间:2018-08-22 11:24:00

标签: google-analytics google-tag-manager

我记录了使用Google跟踪代码管理器数据层的点击记录产品:

enter image description here

此外,我的虚拟网页浏览事件为:

enter image description here

我发现,如果在产品点击代码之后调用虚拟页面标签,则虚拟页面会导致电子商务产品性能列表中的双击。

enter image description here

   analytics.logProductClick('flight', selectedFlight, 1, searchParams.travellers)
   analytics.logVirtualPageView('/personalData/', 'Personal data') 

当我评论虚拟页面日志时,双击问题消失了

analytics.logProductClick('flight', selectedFlight, 1, searchParams.travellers)
//analytics.logVirtualPageView('/personalData/', 'Personal data')

经过调查,我发现该虚拟页面标签会在我的代码中创建并调用此代码(这就是ecomerce点击次数未正确计数的原因):

ga("create", "UA-xxxxx-xx", {name: "gtm2834", cookieDomain: "auto"})
ga("gtm2834.set", "&gtm", "xxxxxxxx")
ga("gtm2834.set", "dimension2", "1534944292553.6qexcrcl")
ga("gtm2834.set", "dimension3", "2018-08-22T16:24:52.553+03:00")
ga("gtm2834.set", {anonymizeIp: true, forceSSL: true, customTask: function(){ console.log('[function]')}, title: "Personal data", page: "http://localhost:3000/results/VNO-OSL/2018-09-05/2018-09-10/6,3,0/6d46223577ba861c8b57a07880194ae4829aacb4-665d46424f9fe93b11c35a55708fc8010943bb9f/?currentStep=flightDetails"})
ga("gtm2834.set", "hitCallback", function(){ console.log('[function]')})
ga("gtm2834.require", "ec", "ec.js")
ga("gtm2834.ec:addProduct", {name: "VNO|OSL|OSL|VNO", id: "Flights", price: 2154.75, brand: "Lufthansa|Austrian Airlines", category: "Europe/Noorwegen/Oslo", variant: "05-09-2018|10-09-2018|1xoverstap|1xoverstap", coupon: "VNO|OSL|9|6|3|0|Economy", position: 0})
ga("gtm2834.ec:setAction", "click", {list: "FlightSearch|VNO|OSL|9|6|3|0|AF=No|Economy|Recommended", action: "click"})
ga("gtm2834.send", "pageview")

1 个答案:

答案 0 :(得分:0)

我发现增强了电子商务的虚拟事件触发标签是双重问题来源。

enter image description here