Netminers InSight is capable of tracking e-commerce transactions and relate these to online campaigns and other traffic sources. In order to enable e-commerce tracking, you must create the basket JSON object described below.
An e-commerce transaction contains one or more ordered items. Each item has an id (SKU), a name, an integer indicating the number of units ordered and a unit price.
These are indicated in the following JSON object, where '[...]' should be replaced by your own parameters.
if(typeof(document.netminers) != 'object') document.netminers = {}; document.netminers.basket = { 'items': [ { 'sku': '[...]', 'name': '[...]', 'units': '[...]', 'price': '[...]' }, { 'sku': '[...]', 'name': '[...]', 'units': '[...]', 'price': '[...]' }, { 'sku': '[...]', 'name': '[...]', 'units': '[...]', 'price': '[...]' }, { 'sku': '[...]', 'name': '[...]', 'units': '[...]', 'price': '[...]' } ] }
Important:
- The above JSON object should be placed on the last checkout page of your shopping cart
- If a visitors orders more of the same items, 'units' must indicate the number of units and 'price' must indicate the unit price (not the total price)
- Price must be indicated in on of the following formats (one thousand): 1,000.00, 1000.00 or 1000
- The values for the price do not respect any currency formatting
Example of a basket
if(typeof(document.netminers) != 'object') document.netminers = {}; document.netminers.basket = { 'items': [ { 'sku': 'DF22', 'name': 'BLK T-Shirt', 'units': '1', 'price': '1000.00' }, { 'sku': 'HY62', 'name': 'HH Socks', 'units': '2', 'price': '150.00' }, { 'sku': 'IK14', 'name': 'Milway Trousers', 'units': '1', 'price': '1,500.00' }, ] }