Google Analytics 多跟踪订单未完全运行

Google Analytics Multi Tracking Order is not working completely

我有 Google 这样的分析代码。这是客户端浏览器上查看页面源的结果示例,而不是 JSP 代码。首先创建对象并发送页面视图。

ga('create', 'UA-11111111-1', 'auto');
ga('send', 'pageview');
ga('create', 'UA-11111111-2', 'auto', {'name': 'Rollup'});
ga('Rollup.send', 'pageview');
ga('create', 'UA-11111111-3', 'auto', {'name': 'AnotherRollup'});
ga('AnotherRollup.send', 'pageview');

这工作正常。我的意思是,我可以在 google 分析中看到所有三个帐户的所有实时页面浏览量。然后是添加交易代码。

ga('require', 'ecommerce');

// create transaction object
var Transaction = {
  'id': '12345', // transaction ID
  'affiliation': 'North East Store',
  'revenue': 100.00',
  'shipping': '0.00',
  'tax': '0.00'
};

// add transaction to all the trackers
ga('ecommerce:addTransaction', Transaction);
ga('Rollup.ecommerce:addTransaction', Transaction);
ga('AnotherRollup.ecommerce:addTransaction', Transaction);

然后按照代码将项目添加到交易中。

var Item = {}; // this is to prepare the var for multi items.

Item = {
    'id': '12345',         // transaction ID
    'name': 'Microwave',   // name
    'sku': '111',          // SKU/code.
    'category': 'Kitchen', // Category or variation.
    'price': '20.00',      // Unit price.
    'quantity': '5'        // Quantity.
};

ga('ecommerce:addItem', Item);
ga('RollUp.ecommerce:addItem', Item);
ga('AnotherRollUp.ecommerce:addItem', Item);

然后按照代码将所有这些订单发送到 google 分析。

//submits transaction to the Analytics servers
ga('ecommerce:send');
ga('Rollup.ecommerce:send'); 
ga('AnotherRollup.ecommerce:send');

问题是,第一个帐户的 google 分析中的顺序仅为 received/updated(在此 javascript 代码案例中为 unnamed/default)。我认为这是因为我为其他两个使用了错误的 google 分析跟踪器帐户代码。但是我已经复查了,另外两个tracker账号代码是正确的,我可以实时看到页面浏览量。所以那一定不是因为那个。我的来源是:

https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#multitracker

我已经检查了所有内容,根据该手册,一切都是正确的。但我仍然无法获得其他两个跟踪器(Rollup 和 AnotherRollup)的结果。我的代码有什么问题吗?或者问题出在其他地方?非常感谢。

每次包含电子商务库时都需要包含跟踪器名称:

ga('require', 'ecommerce');
ga('RollUp.require', 'ecommerce');
ga('AnotherRollUp.require', 'ecommerce');

这甚至记录在这里:https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#multitracker