mattstache
mattstache

Reputation: 135

How do I record "city", "state", and "country" when adding a transaction using Universal Analytics?

Using Classic Google Analytics, adding a transaction included "city", "state", and "country" as options.

_gaq.push(['_addTrans',
  '1234abc',      // Transaction ID*
  'Tech Parts',   // Affiliation
  '45.00',        // Total* (no tax or shipping)
  '4.50',         // Tax
  '10.00',        // Shipping
  'Austin',       // City
  'Texas',        // State or province
  'USA'           // Country
]);
// * Designates the required items

Using Universal Analytics, these tags were removed:

ga('ecommerce:addTransaction', {
             id: '1234abc',     // Transaction ID*
    affiliation: 'Tech Parts',  // Store Name
        revenue: '59.50',       // Total
       shipping: '10',          // Shipping
            tax: '4.50'         // Tax
});
// * Designates the required items

How can I record those values in Universal Analytics?

Upvotes: 1

Views: 70

Answers (1)

nyuen
nyuen

Reputation: 8907

It doesn't look like you can add city, state, country information to a transaction anymore, according to this: http://misterphilip.com/universal-analytics/migration/ecommerce. You can try to add them through custom dimensions though.

Upvotes: 2

Related Questions