ÃÛ¶¹ÊÓÆµ

Purchase event

The purchase event is a value in the events variable. This value is useful for organizations that want to collect data around the revenue that their site generates. It is heavily dependent on the products and purchaseID variables.

When you set a purchase event, it affects the following metrics:

  • The ‘Orders’ metric increments by 1
  • The ‘Units’ metric increments by the number of products in the products variable
  • The ‘Revenue’ metric increases by the sum of price parameters in the products variable
NOTE
Revenue is not multiplied by the quantity field. For example, s.products="Womens;Socks;5;4.50" does not pass $22.50 into revenue; it passes $4.50. Make sure that your implementation passes the total revenue for the quantity listed. For example, s.products="Womens;Socks;5;22.50".

Set the purchase event using the Web SDK

If using the XDM object, the purchase event uses the following XDM fields:

  • Orders are mapped to xdm.commerce.purchases.value.
  • Units are mapped to the sum of all xdm.productListItems[].quantity fields. See products for more information.
  • Revenue is mapped to the sum of all xdm.productListItems[].priceTotal fields.