Name of affected component: Web Tracking (analytics.js)
Issue summary:
I want to only send the eCommerce transaction/item data from the site but don't
want the page details to be tracked in which the eCommerce javascript is
loaded. To achieve this I didn't use ga('send','pageview') in the script but I
could still the data in Real time reports.
Although I can't see the page details in Behavior > Site Content > All Pages
which is fine.
So, probably the issue persists in real-time reporting or may be I am missing
something.
Expected output:
Should not send page details to google analytics by default when sending
eCommerce data.
Notes:
For reference, following is the script I am using:
<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-XXXXXXXX-X', 'auto');
ga('require', 'ecommerce', 'ecommerce.js');
ga('ecommerce:addTransaction', {
'id': 'T001',
'affiliation': 'Example',
'revenue': '10',
'shipping': '0.00',
'tax': '0.00'
});
ga('ecommerce:addItem', {
'id': 'T001',
'name': 'prod1',
'sku': 'pid1',
'category': '',
'price': '5',
'quantity': '2'
});
ga('ecommerce:send');
</script>
Original issue reported on code.google.com by pmah...@cvent.com on 18 Dec 2014 at 5:59
Original issue reported on code.google.com by
pmah...@cvent.com
on 18 Dec 2014 at 5:59