Jump to content

ganalytics transaction total is empty


Recommended Posts

Hi there, I installed and configured ganalytics on ps 1.5.6.0 enabling universal analytics.

I enabled ecommerce stats in google analytics and everything seems to work quite fine except for the fact that the transactions total and total average is always 0. if I open the transactions or products view the total products amount is correct, in the transaction view I even got the correct shipping fees, but the transactions total wont consider those datas. I readed in a google doc that if the transaction object isn't sent to google before items, the item objects will be child of an empty transaction, but I double checked that and the transaction js snippet is correctly generated in the order confirmation page, with all the correct data and the request is correctly sent to google.

Any hint on why that's happening?

Thank you in advance.

Edited by frankit (see edit history)
Link to comment
Share on other sites

I noticed (here: https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#addTrans )

that the transaction params sent by prestashop aren't specified as shown in the google documentation.

here's is the js as shown by google:

ga('ecommerce:addTransaction', {
  'id': '1234',
  'affiliation': 'Acme Clothing',
  'revenue': '11.99',
  'shipping': '5',
  'tax': '1.29',
  'currency': 'EUR'  // local currency code.
});

and here is the snippet from ganalytics module:

ga('ecommerce:addTransaction', {
	'id': '{$trans.id}',
	'store': '{$trans.store}',
	'total': '{$trans.total}',
	'tax': '{$trans.tax}',
	'shipping': '{$trans.shipping}',
	'city': '{$trans.city}',
	'state':'{$trans.state}',
	'country': '{$trans.country}',
	'currency': 'EUR'
});

It seems that "store" and "total" should be "affiliation" and "revenue", in addiction there's no mention of "city", "country" and "state" for the transaction object. So I updated the current params as shown by google, let's see if in 24h google analytics will get the data as expected, I'll let you know that.

Thanks.

Edited by frankit (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...