Abs
Abs

Reputation: 57966

GA Ecommerce tracking data not being sent

I have the following ecommerce tracking code. I am making use of multiple trackers. The pageviews are getting tracked correctly but when I view the ecommerce reports no data is coming through. What am I missing?

(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-34658431-1', 'auto', {'name' : 'primary'}); // primary tracker
ga('create', 'UA-64375824-1', 'auto', {'name': 'secondary'});  // secondary tracker.

ga('secondary.send', 'pageview');
ga('primary.send', 'pageview');

ga('primary.require', 'ecommerce');
ga('secondary.require', 'ecommerce');
//ga('primary.ecommerce:clear');
//ga('secondary.ecommerce:clear');

var transaction_id = '1';

var ga_transaction = {
    'id': transaction_id,
    'affiliation': 'primary',
    'revenue': '2.46',
    'shipping': '',
    'tax': ''
};

ga('primary.ecommerce:addTransaction', ga_transaction);
ga('secondary.ecommerce:addTransaction', ga_transaction);

var ga_item = {
    'id': transaction_id,
    'name': 'Test',
    'sku': 'Pc6Q',
    'category': 'eBook',
    'price': '2.00',
    'quantity': '1'
};

ga('primary.ecommerce:addItem', ga_item);
ga('secondary.ecommerce:addItem', ga_item);

ga('secondary.ecommerce:send');
ga('primary.ecommerce:send');

Upvotes: 0

Views: 116

Answers (1)

Eike Pierstorff
Eike Pierstorff

Reputation: 32780

Like pointed out in my comment (and like you have now found in the documentation) there is a processing latency (and typically it's much longer for transactions and custom dimensions and custom metrics than for pageviews and events).

For the benefit of others here is the relevant part from the documenation:

Data processing latency Processing latency is 24-48 hours. Standard accounts that send more than 200,000 sessions per day to Google Analytics will result in the reports being refreshed only once a day. This can delay updates to reports and metrics for up to two days. To restore intra-day processing, reduce the number of sessions you send to < 200,000 per day. For Premium accounts, this limit is extended to 2 billion hits per month.

Data might be processed quicker but you cannot rely on it.

So this problem can be resolved simply by waiting.

Upvotes: 1

Related Questions