增强型电子商务Google Analytics(分析)代码,可添加到购物车 [英] Enhnaced ecommerce google analytics code for add to cart

查看:81
本文介绍了增强型电子商务Google Analytics(分析)代码,可添加到购物车的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是用于添加到Google Analytics(分析)增强型电子商务功能中的购物车的代码.

This is code for add to cart in enhanced ecommerce feature of google analytics.

function addToCarts() {
    ga('ec:addProduct', {
        'id': '12334',
        'name': 'methyly methly',
        'category': 'Clothing',
        'brand': '',
        'variant': '',
        'price': '100',
        'quantity': 40
    });
    ga('ec:setAction', 'add');
    // send this using event
    ga('send', 'event', 'enhanced ecommerce', 'button click', 'add to cart');
}
addToCarts();

这反映在转化"->电子商务">产品性能"的添加到购物车"指标中. 请参阅附件图片.

This is reflected in Conversions-->Ecommerce-->Product performace's Add to cart metrics. Please see attached image.

在这里,我将数量的默认值设置为40,但在Google Analytics(分析)中,产品添加到购物车"指标仍然仅将其递增1.

Here i am setting default value of quantity to 40 but still 'Products Add to cart' metrics only increments it by 1 in google analytics.

只需确认是否已从开发人员工具检查了40个数量,并且仅发送了40个数量,但仍在Google Analytics(分析)中"Products Add to cart"指标在Google Analytics(分析)中仅增加了1.

Just to confirm that 40 quantity is sent or not i checked from developers tool and quantity is sent 40 only but still in google analytics 'Products Add to cart' metrics only increments it by 1 in google analytics.

推荐答案

是的,我确认该列表示将产品添加到购物车的次数,而不是产品的数量添加到购物车.您可以在同一报告的摘要"选项卡中找到数量.

Yes, I confirm that that column indicates the number of times the product was added to the shopping cart, not the quantity of product added to the cart. You can find the quantity in Summary tab of the same report.

这篇关于增强型电子商务Google Analytics(分析)代码,可添加到购物车的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆