Google电子商务跟踪无法跟踪

时间:2015-09-25 06:35:26

标签: google-analytics e-commerce google-analytics-api tracking

我尝试在本地测试谷歌电子商务跟踪,我已将此代码放入我的订单finalize.aspx页面

但是当我转到谷歌分析资料时 - 我看到一个用户正在检查网站,但我的产品都没有被添加到电子商务的重新定位中

可能是什么问题?

<title>Receipt for your clothing purchase from Acme Clothing</title>
<script type="text/javascript">
        (function (i, s, o, g, r, a, m) {
            i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date(); a = s.createElement(o),
            m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

        ga('create', 'UA-68062306-1', 'none');
        ga('send', 'pageview');
        ga('require', 'ecommerce');
        ga('ecommerce:addTransaction', {
            'id': '1234',                     // Transaction ID. Required.
            'revenue': '11.99',               // Grand Total.
            'shipping': '5',                  // Shipping.
            'tax': '1.29'                     // Tax.
        });
        ga('ecommerce:addItem', {
            'id': '1234',                     // Transaction ID. Required.
            'name': 'Fluffy Pink Bunnies',    // Product name. Required.
            'sku': 'DD23444',                 // SKU/code.
            'category': 'Party Toys',         // Category or variation.
            'price': '11.99',                 // Unit price.
            'quantity': '1'                   // Quantity.
        });
        ga('ecommerce:send');
</script>

0 个答案:

没有答案