How to handle Analytics Enhanced Ecommerce product float quantity
Asked Answered
D

2

10

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.

Dogger answered 8/1, 2017 at 20:30 Comment(0)
E
2

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.

Eastbourne answered 15/1, 2017 at 14:9 Comment(7)
The problem with that is that it really messes the items per cart reportsDogger
Yes, but this would still be an issue even if Google would support float quantities and quantity units of measure, since there is no way to tell which unit of measure should correspond with one item in the cart. For example: if you would sell gold per gram and sand per kilogram.Eastbourne
Also, total quantity per cart isn't very useful anyway without taking item prices into account.Eastbourne
You can add a custom dimension which specifies whether the product added to cart/checked out is measured by weight or not, and then use this dimension to filter out this kind of product, if you don't want them to interfere with regular products.Eastbourne
@Eastbourne as you said in the answer the price can have up to 6 decimals. is there any way to reduce that number or put decimal point between them? if have please suggestWahoo
@PragneshGhodaシ I'm not sure I understand your question. The price in GA is a float accurate to 6 decimals (last time I checked, which is about as long ago as this question is old...). Do you mean you want to format this number somewhere to less decimal places and round it down?Eastbourne
@Eastbourne yes. 6 decimals are too long for the cart items which have minimal prices.. is there any way to limit this number or put decimal point between them?Wahoo
K
1

Thats right. "quantity" is integer. So it's impossible to pass there a float value. If you are selling a product xx in quantities of 0.3ls, 1.2lb ... try to handle these as a variant of the product.

variant': '1.2lb',

use quantity only for countable packaging units.

Kaolin answered 11/1, 2017 at 16:7 Comment(6)
Should I send quantity at all in this case?Dogger
Why not? If you send more data to Analytics you can analyse more. If you ship one unit of 1.2lb: variant: 1.2lb, quantity: 1 If two units of 1.2lb: variant: 1.2lb, quantity: 2Kaolin
But, that is the point I don't quantity, the user ordered 0.2lb of "Black Paper" or 12.2fl-oz of "Olive Oil"Dogger
In my opinion you think a little bit to complicated or I don't understand your needs to the statistic. If I order these 12.2fl-oz of "Olive Oil". Is it packed in one unit? Than it is 1 unit of variant 12.2fl-oz. Additional questions: Is it possible to order 12.1 or 13.7 fl-oz? Eventualy you can explain me exactly what insight you want to archive. Do you whant to know how many lb you have sold of one product or how often you sell it?Kaolin
These items are sold by the weight and not by unit, a user can order any weight he might wants. 0.1lb, 0.2lb, 0.3lb....Dogger
Ok now I see the problem a little bit better. I think there is no realy good solution. Only a base unit of 0.1. but you excluded these option. My last idea is the Google Support. If you use Adwords you can contact them. Sorry. I hope you can figure out a good solution for your problem.Kaolin

© 2022 - 2024 — McMap. All rights reserved.