alvaro_se
alvaro_se

Reputation: 355

Recording event data problem in google analytics ecommerce

I'm implementing enhanced ecommerce in Google Analytics and I have a problem. When the purchase of a product is made, it's redirected to a thanks page and that's where the Purchase event is sent to Analytics.

ga('require', 'ec');
ga('set', 'currencyCode', 'EUR');    
ga('ec:addProduct', {
    'id': 'prueba-001',
    'name': 'Prueba',
    'brand': 'Prueba',
    'category': 'Prueba',
    'variant': 'Prueba',
    'price': 10.50
});
ga('ec:setAction', 'purchase', {
    'id': 't-prueba-01',
    'revenue': 5.50
});
ga('send', 'pageview');

The 'purchase' event is recorded perfectly, but the addProduct event is not quite right, the unique purchases of each product are registered but nothing else. enter image description here

I don't know what else to do, I have followed the steps in the documentation and the problem persists.

Edit:

Sales report enter image description here

Upvotes: 1

Views: 88

Answers (1)

Michele Pisani
Michele Pisani

Reputation: 14189

Try to use quote for price and revenue (for consistency with the documentation) and above all add the quantity parameter to the product.

Upvotes: 1

Related Questions