order

Order tracking

Yottly measures the personalistation performance in terms of clickthrough rate and revenue.

The clickthrough rate is measured automatically if you use product urls provided by the recommender or attach query parameters as described here.

To measure revenue performance, order tracking needs to be implemented by calling the order(orderInfo) method of the base diffAnalytics object when a user makes an order (on a thank you page for example).

diffAnalytics.order(orderInfo)

  • orderInfo = { content: orderItems }
  • orderItems is an array of purchased products in the form: { productId: "product-id-1", price: 20 }
  • productId must be an id of a product from your product feed
  • price is the current price of the product if one product is purchased or total price sum if multiple products of the same id are purchased. For example: if a single “product-id-1” costs 10 and customer purchases two of them, the price should be 20. Please provide prices including VAT.

Full example:

A customer purchases one shampoo and two soaps for a price 10 and 20 respectively:

var content = [
  { productId: "shampoo-1", price: 10 },
  { productId: "soap-1",    price: 40 }
]
diffAnalytics.order({ content: content })

 

Validate your implementation

Go to the browser console, select Network and one of the save-action requests should contain orderSubmitted in the attachment when an order is finished (i.e., thank-you-page is loaded). Please pay attention to correct spelling.

order

Was this article helpful to you? Yes No