Move to Universal Analytics - how to send City, St

2019-07-10 02:22发布

For some reason City, State, Country now are not used in Universal Analytics

https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs

New version:

ga('ecommerce:addTransaction', {
  'id': '1234',                     // Transaction ID. Required
  'affiliation': 'Acme Clothing',   // Affiliation or store name
  'revenue': '11.99',               // Grand Total
  'shipping': '5',                  // Shipping
  'tax': '1.29'                     // Tax
});

Old version:

_gaq.push(['_addTrans',
  '1234',           // Transaction ID. Required
  'Acme Clothing',  // Affiliation or store name
  '11.99',          // Total. Required
  '1.29',           // Tax
  '5',              // Shipping
  'San Jose',       // City
  'California',     // State or Province
  'USA'             // Country
]);

But how can I send City, State and Country now? Will Google calculate these variables for itself only?

0条回答
登录 后发表回答