电子商务跟踪

一旦启用电子商务跟踪一个网站,你需要实现在您的网站的各种电子商务互动跟踪。 三个主要的电子商务交互:

  • 电子商务订单(及制品)
  • 电子商务购物车的更新(及制品)
  • 产品(和/或类别)的页面浏览量。

下面的章节解释如何设置电子商务跟踪,使用JavaScript的跟踪电子商务跟踪方法。

跟踪电子商务的订单和购买的商品

跟踪电子商务订单和产品的详细信息将允许Piwik来处理报告:

  • 产品SKU,
  • 产品名称,
  • 热门产品类别,并在你的网上商店的电子商务业绩概述。

要跟踪电子商务订单,两个JavaScript函数用于:

1 addEcommerceItem( productSKU ,产品名称,产品分类,价格,数量),这增加了产品进入的顺序,必须调用的顺序每一件产品。 productSKU是必需的参数,也建议您发送其他参数。

2 trackEcommerceOrder(订单ID,grandTotal,小计,税金,运费,折扣)会跟踪电子商务秩序,将数据发送到您的Piwik服务器。 只有订单ID和grandTotal(即收入)是必需的。

[...]
// add the first product to the order
_paq.push(['addEcommerceItem',
"9780786706211", // (required) SKU: Product unique identifier
"Endurance: Shackleton's Incredible Voyage", // (optional) Product name
"Adventure Books", // (optional) Product category. You can also specify an array of up to 5 categories eg. ["Books", "New releases", "Biography"]
8.8, // (recommended) Product price
1 // (optional, default to 1) Product quantity
]);
// Here you can add other products in the order
[...]
// Specifiy the order details to Piwik server & sends the data to Piwik server
_paq.push(['trackEcommerceOrder',
"A10000123", // (required) Unique Order ID
35, // (required) Order Revenue grand total (includes tax, shipping, and subtracted discount)
30, // (optional) Order sub total (excludes shipping)
5.5, // (optional) Tax amount
4.5, // (optional) Shipping amount
false // (optional) Discount offered (set to false for unspecified parameter)
]);
// we recommend to leave the call to trackPageView() on the Order confirmation page
_paq.push(['trackPageView']);
[...]

results matching ""

    No results matching ""