We have a requirement where we need to track number of add-ons made on top of a room booking ( add-ons are something like breakfast, car park etc.)
There can be multiple quantities of add-on in a single booking ( for ex, 2 breakfasts and 1 car park. so total of 3). When we used event, it didnt work as it's a counter(It showed quantity as 1). We also tried with numeric event but it still didn't work.
A workaround that we did was to get the quantity value in an eVar( got the qty value from Data layer)
Now for consumption of reports, we would need to put add-on names in rows and addon revenue, addon quantity in columns. Since addon qty is an eVar here, we thought of creating a metric with eVar. However, eVars can be used only as segments in metrics and not as a metric, although events can be made into metrics.
1. I thought about same solution not so long ago, based on eVar values create a metric. Not possible at all.
It needs to either send as an event or use processing rule to increment an event by this value.
2. it is possible to send counter and numeric events to increment by more than one. doc
3.The products variable allows you to send additional events in the products variable itself which ties these events to only the specific product. Really useful if you want to send let say VAT for only this product and/or shipping cost for only this product.
If a currency event receives a value in the products variable instead of the events variable, it applies only to that value. This is useful to track product-specific discounts, product shipping, and similar values. For example, if you configured event 1 to track product shipping, a product with a "4.50" shipping charge might appear similar to the following:
If a currency event receives a value in the events list instead of the products variable, it applies to all products in the products variable. This is useful to track order-wide discounts, shipping, and similar values, without modifying the product price or by tracking it in the product list separately.
For example, if you configured event10 to contain order-wide discounts, a purchase with a 10% discount might appear similar to the following:
On currency event reports, the report total represents the de-duplicated event total (in this example, the total amount of discounts during the reporting period), not the sum of the event values for each product. For example, you would see "9.95" listed for both "Running Shoes" and "Running Socks", and the total would also be "9.95".
Note: if a value for the same Numeric/Currency Event is specified in the products variable and in the events variable, the value from theevents is used.
MAKE SURE TO KEEP ALL OF THE PRODUCTS PLACE HOLDER EVEN IF YOU DO NOT PUT ANY VALUES.
So you have add-ons then you could do something like.
So per code above, I make one booking of a double room, with one parking add-on (event1) and 2 breakfast add-on (event2), so it gives me a total of 3 add-ons (event3).
You could as well omit event3 and simply do a calculated metric with sum of event1 and event2
report would be something like
Products order unit revenue Parking(event1) Breakfast(event2) Add-ons(event3)
double room 1 1 100 1 2 3
That is just an example of what you can do.
Now I am going to a bit deeper and do not know if it will totally work and how much work it will add but I think you could use a calculated metric based on the values in your evar to create a total for add on.
You can use IF-THEN function in a calculated metric, so you would be able to do something like