Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle Analytics Enhanced Ecommerce product float quantity

According to the "Enhanced Ecommerce" product data "quantity" only supports integers.

But, some of the items on our cart are sold by the pound as such the quantity is not an integer but can be. 0.3ls, 1.2lb and etc. Two issues:

  1. When the quantity is less than 0.5 then it seems like it's rounded to 0 and the line is not shown at all.
  2. Even when it's shown e.g. 1.3 rounded to 1 then we loose a lot of data here.

A workaround like moving to work in 1unit=0.01lb before we send it to GA has its own drawbacks and causes a signification data impact.

like image 572
Guy Korland Avatar asked Jan 08 '17 20:01

Guy Korland


People also ask

What is the best advice you can give for setting up ecommerce tracking in Google Analytics?

“One of the most important metrics you can utilize in Google Analytics for your online store is conversion rate,” says Pupford's Devin Stagg. “Diving down into conversion rate by landing page, product page, and source/medium can give you valuable insights into your pages as well as your traffic.”

What is enhanced ecommerce in Google Analytics?

Enhanced Ecommerce offers marketers the ability to fully customise Google Analytics around your website's purchasing funnel. A robust installation of the plugin unlocks new dimensions and metrics which collectively offer a wealth of actionable insight into the monetary performance of your website.

How do you use enhanced ecommerce?

Open up the Google Analytics Settings variable. Go to “More Settings” Uncheck “Use Data Layer” Press “Ecommerce” and set “Enable Enhanced Ecommerce Features” to “Read data from macro”.


1 Answers

The workaround you suggest (using a smaller unit) is the only good solution right now, until Google implements float quantities.

In terms of data signification it actually doesn't have an impact: a product unit is arbitrary anyway, since you could have pounds, ounces, grams, milligrams or any multiple of these or other units as the smallest increment for a product. As long as the price per unit is accurate your data will be correct. Prices can have up to 6 decimals so any rounding errors are negligible.

To ensure your data is readable, I suggest that you look for a base unit that is low enough (for example a thousandth of a pound) so you can always express orders for your current and future products in integer multiples of it. That way you only have to do one transformation (x 1000) when reading report data, instead of having to remember the base unit for each product.

like image 198
inwerpsel Avatar answered Oct 22 '22 01:10

inwerpsel