我需要通过goggle analytics报告api获取特定项目的ID,网站上的Google分析代码如下:
// 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';
}
});
我该怎么做?