Google跟踪代码管理器/增强型电子商务-浏览量代码数据层推送不起作用

时间:2019-06-24 11:43:24

标签: javascript google-analytics google-tag-manager google-datalayer enhanced-ecommerce

在一个网站上,我已经使用dataLayer成功地与GTM集成了增强型电子商务,并且所有标签均处于触发状态,数据正按预期方式传递到Google Analytics(分析)。但是,在另一个克隆的网站上,我也以完全相同的方式设置了GTM / GA,但是dataLayer推送并未发送产品详细信息视图或产品列表印象。

我使用GTM中的基本页面视图标签在GA视图中启用了增强型电子商务功能,该标签的配置方式与工作网站完全相同,如下所示:

enter image description here

,然后推入脚本底部的dataLayer对象:

    dataLayer.push({
        'ecommerce': {
            'currencyCode': 'GBP',
            'impressions': gtmProducts
        }
    });

Google Analytics Debugger v2.7中,我看到以下输出-没有在页面视图上传输产品印象!

                         _                          _       _   _
                        | |                        | |     | | (_)
  __ _  ___   ___   __ _| | ___    __ _ _ __   __ _| |_   _| |_ _  ___ ___
 / _` |/ _ \ / _ \ / _` | |/ _ \  / _` | '_ \ / _` | | | | | __| |/ __/ __|
| (_| | (_) | (_) | (_| | |  __/ | (_| | | | | (_| | | |_| | |_| | (__\__ \
 \__, |\___/ \___/ \__, |_|\___|  \__,_|_| |_|\__,_|_|\__, |\__|_|\___|___/
  __/ |             __/ |                              __/ |
 |___/             |___/                              |___/

analytics_debug.js:15 Running analytics_debug.js. This script is intended for testing and debugging only.
log @ analytics_debug.js:15
J @ analytics_debug.js:14
(anonymous) @ analytics_debug.js:101
(anonymous) @ analytics_debug.js:101
analytics_debug.js:15 Initializing Google Analytics.
analytics_debug.js:15 Loading resource for plugin: ec
analytics_debug.js:15 Loading script: "https://www.google-analytics.com/plugins/ua/ec.js"
analytics_debug.js:15 Running command: ga("create", "my-trackingId", {name: "gtm1", cookieDomain: "auto"})
analytics_debug.js:15 Creating new tracker: gtm1
analytics_debug.js:15 Auto cookieDomain found: "my-domain"
analytics_debug.js:15 Running command: ga("gtm1.set", "&gtm", "my-gtm")
analytics_debug.js:15 Running command: ga("gtm1.set", "hitCallback", [function])
analytics_debug.js:15 Running command: ga("gtm1.require", "ec", "ec.js")
analytics_debug.js:15 Waiting on require of "ec" to be fulfilled.
analytics_debug.js:15 Registered new plugin: ga(provide, "render", Function)
analytics_debug.js:15 Running command: ga("gtm1.require", "ec", "ec.js")
analytics_debug.js:15 Waiting on require of "ec" to be fulfilled.
analytics_debug.js:15 Executing Google Analytics commands.
analytics_debug.js:15 Registered new plugin: ga(provide, "ec", Function)
analytics_debug.js:15 Running command: ga("gtm1.require", "ec", "ec.js")
analytics_debug.js:15 Plugin "ec" intialized on tracker "gtm1".
analytics_debug.js:15 Running command: ga("gtm1.send", "pageview")
analytics_debug.js:15 
Sent beacon:
v=1&_v=j76d&a=my-adSenseId&t=pageview&_s=1&dl=http%3A%2F%2Fmy-domain%2Fshopby%2Frings&ul=en-us&de=UTF-8&dt=Title%20%7C%20My%20Site&sd=24-bit&sr=2560x1440&vp=2545x714&je=0&_u=SCCAAEAL~&jid=&gjid=&cid=my-clientId&tid=my-trackingId&_gid=1488000190.1561364013&gtm=my-gtm&z=134019913


analytics_debug.js:15 <unknown>        (&gtm)  my-gtm
analytics_debug.js:15 _j1              (&jid)  
analytics_debug.js:15 _j2              (&gjid) 
analytics_debug.js:15 adSenseId        (&a)    my-adSenseId
analytics_debug.js:15 apiVersion       (&v)    1
analytics_debug.js:15 clientId         (&cid)  my-clientId
analytics_debug.js:15 encoding         (&de)   UTF-8
analytics_debug.js:15 hitType          (&t)    pageview
analytics_debug.js:15 javaEnabled      (&je)   0
analytics_debug.js:15 language         (&ul)   en-us
analytics_debug.js:15 location         (&dl)   http://my-domain/shopby/rings
analytics_debug.js:15 screenColors     (&sd)   24-bit
analytics_debug.js:15 screenResolution (&sr)   2560x1440
analytics_debug.js:15 title            (&dt)   Title
analytics_debug.js:15 trackingId       (&tid)  my-trackingId
analytics_debug.js:15 viewportSize     (&vp)   2545x714

但是,如果我修改此推送代码以在自定义EEproductListingsUpdate事件代码上触发,如下所示:

    dataLayer.push({
        'event': 'EEproductListingsUpdate',
        'ecommerce': {
            'currencyCode': 'GBP',
            'impressions': gtmProducts
        }
    });

具有以下标记配置:

enter image description here

然后我在GA调试器中看到以下命令:

Running command: ga("gtm3.send", {hitType: "event", eventCategory: "eCommerce", eventAction: "Product Listings Update", eventLabel: undefined, eventValue: undefined})

所有展示都已发送完毕...为什么当dataLayer.push()出现在另一个网站上时,页面浏览量标记无法发送展示吗?在GA / GTM面板中,无论是代码方式还是配置方式,我应该在哪里找到答案?一切都一样?

0 个答案:

没有答案