I need to get views of particular item by it's id from goggle analytics reporting api, google analytics code on the site looks like that:
// Called when a link to a product is clicked.
function onProductClick241() {
ga('ec:addProduct', {
'id': '241',
'name': 'Туфли',
'category': 'Туфли Весна - Осень 2016',
'brand': 'Bertoli',
'position': 17,
});
ga('ec:setAction', 'click', {list: 'Category List'});
// Send click with an event, then send user to product page.
ga('send', 'event', 'UX', 'click', 'Results', {
hitCallback: function() {
document.location = '/shoes/tufli/241-bertoli';
}
});
How can I do that?