Information Technology Reference
In-Depth Information
Version 4
var ACTION='01';
var _S_SKU='DM112899';
var _S_UNITS='2';
var _S_AMOUNTS='100.00';
_S_UNITS tracks the number of each item sold, and S_AMOUNTS records the total
price of a product (which is the individual price of an item multiplied by the total num-
ber of units of the respective item).
But no decent sale can be recorded without the total amount and a unique order
id, which we deploy by adding the ORDERID and AMOUNT variables. The following code
results:
Version 4
var ACTION='01';
var _S_SKU='DM112899';
var _S_UNITS='2';
var _S_AMOUNTS='100.00';
var ORDERID='10099802';
var AMOUNT='USD100.00';
88
Version 5
YWATracker.setAction(“01“);
YWATracker.setSKU(“DM112899“);
YWATracker.setUnits(“2“);
YWATracker.setAmounts(“100.00“);
YWATracker.setOrderId(“10099802“);
YWATracker.setAmount(“USD100.00“);
There is a distinct difference between the _S_AMOUNTS and AMOUNT variables: The
AMOUNT variable references the total sum of the sale, and the _S_AMOUNTS variable refer-
ences the total amount of the individual product, in question. in the previous example,
as we only reference one product, the two sums are the same, but as you will see later,
this is not the case if a client purchases multiple products in the same basket.
i created a quick custom report, shown in Figure 4.2, that showcases the previ-
ous scenario. products are grouped by individual customer, then by their unique order,
and finally by the product items purchased within those orders.
You will notice that the orders with ids equaling TB0000013021 and
TB0000012895 very much fit our example in regard to identical values applied to
the _S_AMOUNTS and AMOUNT variables, but it is also very visible that the order with the
TB0000012894 id is different, as a whole range of products are sold and we also see
Search WWH ::




Custom Search