Our product can also track orders. To do this, the order value is transmitted along with the order number. "0" values are permitted. A list of tracked orders can be analyzed in Mapp Intelligence under E-Commerce > Orders separately.

The difference to product tracking is that the information refers to the total order value that is transmitted rather than the individual products. Besides the total of purchased products, the total order value may also contain such values as discounts and shipping and packaging costs.

The order value per order must be added to the pixel dynamically. Do not use any thousands separator in the price details. Decimal places are separated using a point or comma.

  • value: saves the total order value. This property must be entered if total order values are to be tracked.
  • id: (optional) contains a unique order number (order ID). Ensures that no orders are counted twice.
  • currency: The currency of an order can be set with the property "currency".
  • couponValue: Contains the value of a coupon. Use this parameter if the customer makes and order with a coupon.
  • paymentMethod: Use this to transmit the payment method of the order.
  • shippingService: Use this to transmit the shipping service of the order.
  • shippingSpeed: Use this to transmit the shipping speed of the order.
  • shippingCosts: Use this to transmit the shipping costs of the order.
  • grossMargin: Use this to transmit the margin/mark-up of the order.
  • orderStatus: Use this to transmit the order status of the order.
  • parameter: You can use parameters to enrich analytical data with your own website-specific information and/or metrics. Observe the syntax guidelines when defining parameters.

Currency

Contains the currency code of a product or order; the value must be passed to the Mapp Intelligence pixel in line with the ISO standard.

The currency is only passed for the purpose of currency conversion. In other words, the currency will be converted to the currency as specified in your Mapp Q3 account configuration (Configuration > System configuration: Data Collection).

Parameter

E-commerce parameters must be set up in the configuration (Configuration > Custom Parameters > ECommerce Parameter) before they can be entered. In this setup, the ID (relevant for tracking) and a data type (text/number) are defined for each parameter. When configuring the tracking in the pixel, you need to include the ID as a number and the respective value as a string.

Parameters can also be used to transmit information about an order, e.g. payment or shipping type. In these cases, order tracking must be used. It is enough to transmit this property once per order. It applies equally to all products in the shopping cart.

The reference (product or order) is selected when configuring the Smart Pixel. If "individual value" is selected, the parameter refers to the order. If "multiple values" have been selected, the parameter can refer to the product or the order.

Methods

The order object contains the following four methods, which are contained in the objects data and parameter:

  • set: Overwrites all existing values.
  • add: Overwrites only the corresponding values.
  • get: Returns the current configuration.
  • remove: Removes the current configuration or individual values.

data

set

/**
 * @param {{
 *      value: number,
 *      [id=""]: string,
 *      [currency=""]: string,
 *      [couponValue=0]: number,
 *      [paymentMethod=""]: string,
 *      [shippingService=""]: string,
 *      [shippingSpeed=""]: string,
 *      [shippingCosts=0]: number,
 *      [grossMargin=0]: number,
 *      [orderStatus=""]: string,
 *      [parameter={}]: {[number]: string}
 * }} data
 *
 * @returns {wtSmart.order.data}
 */
wtSmart.order.data.set(data);
JS

add

/**
 * @param {{
 *      [value]: number,
 *      [id]: string,
 *      [currency]: string,
 *      [couponValue]: number,
 *      [paymentMethod]: string,
 *      [shippingService]: string,
 *      [shippingSpeed]: string,
 *      [shippingCosts]: number,
 *      [grossMargin]: number,
 *      [orderStatus]: string,
 *      [parameter]: {[number]: string}
 * }} data
 *
 * @returns {wtSmart.order.data}
 */
wtSmart.order.data.add(data);
JS

get

/**
 * @returns {{
 *      value: number,
 *      id: string,
 *      currency: string,
 *      couponValue: number,
 *      paymentMethod: string,
 *      shippingService: string,
 *      shippingSpeed: string,
 *      shippingCosts: number,
 *      grossMargin: number,
 *      orderStatus: string,
 *      parameter: {[number]: string}
 * }}
 */
wtSmart.order.data.get();
JS

remove

/**
 * @param {string[]} [removeList]
 *
 * @returns {wtSmart.order.data}
 */
wtSmart.order.data.remove(removeList);
JS

Example

// set order data
wtSmart.order.data.set({
	value: 120.99,
	id: 'M-12345',
	couponValue: 10.00,
	paymentMethod: 'paypal',
	shippingService: 'dhl',
	shippingSpeed: 'express',
	shippingCosts: 4.95,
	grossMargin: 12.95,
	parameter: {
		5: 'bill'
	}
});

// add order data
wtSmart.order.data.add({
    currency: 'EUR'
});

// get order data
var data = wtSmart.order.data.get();
  
// remove all order data
wtSmart.order.data.remove();

// remove only couponValue from order data
wtSmart.order.data.remove(['couponValue']);
JS

parameter

set

/**
 * @param {{[number]: string}} data
 *
 * @returns {wtSmart.order.parameter}
 */
wtSmart.order.parameter.set(data);
JS

add

/**
 * @param {{[number]: string}} data
 *
 * @returns {wtSmart.order.parameter}
 */
wtSmart.order.parameter.add(data);
JS

get

/**
 * @returns {{[number]: string}}
 */
wtSmart.order.parameter.get();
JS

remove

/**
 * @param {number[]} [removeList]
 *
 * @returns {wtSmart.order.parameter}
 */
wtSmart.order.parameter.remove(removeList);
JS

Example

// set order parameter
wtSmart.order.parameter.set({
    1: 'bill'
});

// add order parameter
wtSmart.order.parameter.add({
    7: 'foo.bar'
});

// get order parameter
var data = wtSmart.order.parameter.get();
  
// remove all order parameter
wtSmart.order.parameter.remove();

// remove only order parameter 7
wtSmart.order.parameter.remove([7]);
JS