1

I'm using this code to send product and transaction details to GA Ecommerce.

ga('create', 'UA-xxxxxxxxx-1');
ga('require', 'ec');
let purchaseObj = {},
    prodObj = {};

prodObj.id = 'P123';
prodObj.name = 'Product 1';

purchaseObj.id = '1234567';
purchaseObj.affiliation = 'My Store Website';
purchaseObj.revenue = '45.00';
purchaseObj.tax = '5.00';

ga('ec:addProduct', prodObj);
ga('ec:setAction', 'purchase', purchaseObj);
ga('send','pageview');

It successfully sent over to the GA. It can be found under Conversions > Ecommerce > Sales Performance enter image description here

But in Product Performance tab, Product Revenue still shows 0.

enter image description here

Am I missing something here? Thanks!

Carl Ortiz
  • 423
  • 3
  • 14
  • "Google Analytics 4" seems to be the wrong tag (ga4 does not have enhanced ecommerce). I have had similar problems in the past when I forgot to send the "quantity" field (because GA figured that the quantity was 0 and did not report revenue), so this is something you might want to check first (and yes, I realize that one of your products has a quantity of 1, but it still does not hurt to fix a known problem). – Eike Pierstorff Aug 24 '21 at 10:50
  • Might be a duplicate of https://stackoverflow.com/questions/37438114/cannot-see-products-revenue-in-google-analytics-ee?rq=1. – Eike Pierstorff Aug 24 '21 at 11:00

0 Answers0