Information Technology Reference
In-Depth Information
While the variables in the following example are expressed as constants, i doubt
that you will be able to implement it that way, as your shopping content depends on the
visitor's choices. so expect to have values inflated from your e-commerce platform.
You can also track more products purchased at the same time. here's an example:
Version 4
var ACTION='01';
var _S_SKU='DM112899; DM113834';
var _S_UNITS='2;1';
var _S_AMOUNTS='100.00;50.00';
var ORDERID='10099803';
var AMOUNT='USD150.00';
Version 5
YWATracker.setAction(“01“);
YWATracker.setSKU(“DM112899; DM113834“);
YWATracker.setUnits(“2;1“);
YWATracker.setAmounts(“100.00;50.00“);
YWATracker.setOrderId(“10099803“);
YWATracker.setAmount(“USD150.00“);
98
it is critical that you enter the sales prices in the proper order, as this is how it is
associated in the Yahoo! system. in the previous example, that would be the sale of the
following two products:
2
Units of product dM112899 at a total of Usd100.00
1
Unit of product dM113834 at a total of Usd50.00
a
t a total sales price of Usd150.00 recorded and saved under order id number
10099803
Make sure you align the number of choices within the _S_UNITS and _S_AMOUNTS
variables, as with the _S_SKU variable. That way, if you sell two products, the
_S_UNITS variable will hold two different numbers of units sold, and the _S_AMOUNTS
variable will list two different sales prices.
once your purchased products are tracked as in the preceding example, you can
check reports on products purchased in the reporting interface. at this stage, only the
skU information will be displayed.
Be aware that Yahoo! Web analytics does not check whether the revenue regis-
tered under S_AMOUNTS adds up to the total sales value registered in the AMOUNT variable.
so it is fine to write a tracking script like this:
Version 4
var ACTION='01';
var _S_SKU='DM112899; DM113834';
var _S_UNITS='2;1';
Search WWH ::




Custom Search