2

我已经在我的网站上实现了 GTM。这些事件在 dataLayer 中添加,但未在谷歌分析报告 HTML 中触发:

<!-- Google Tag Manager -->
<noscript>
    <iframe src="//www.googletagmanager.com/ns.html?id=GTM-MBZH97"
            height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
<script>
    (function (w, d, s, l, i) {
        w[l] = w[l] || []; w[l].push({
            'gtm.start':
            new Date().getTime(), event: 'gtm.js'
        }); var f = d.getElementsByTagName(s)[0],
        j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
        '//www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
    })(window, document, 'script', 'dataLayer', 'GTM-MBZH97');</script>
<!-- End Google Tag Manager -->

推送代码:

dataLayer.push({ 'event': 'GAevent', 'eventCategory': 'Login', 'eventAction': 'Complete', 'eventLabel': 'Cookie' });

控制台结果图像:在此处输入图像描述

GTM 标记图像在此处输入图像描述

4

0 回答 0