Loading...

Last updated: Nov 06 2017

Area: Episerver Perform, Episerver Reach Applies to versions: 1.0 and higher (JavaScript API)

Basket page tracking request

The basket page is tracked by providing a list of products in the basket along with the quantity, currency, and unit price.

Quantity and unit price should match what the site visitor sees. So if there is a discount, the discounted price is provided.

NameDescriptionUsage

basket

Element containing basket specific sub-elements.  

     

items

List of checkout items.

 
       

refCode

Product reference code.  
 

qty

Quantity

[Number]

   

price

Unit price

[Number]

 

currency

Currency code

See Currency codes.
  basketId [Optional] Link a specific shopping basket in a Trigger campaign. See Link to a specific basket.

A basket page is tracked using the following script.

{
	"type"   : "basket",
	"lang"   : "en-gb",
	"basket" : {
		"items" : [{
			"refCode" : "PROD500",
			"qty"     : 2,
			"price"   : 25.5
		}, {
			"refCode" : "PROD600",
			"qty"     : 4,
			"price"   : 12.0
		}],
		"currency" : "GBP"
	}
} 

This example illustrates a basket with 6 items.

  • 2 units of PROD500 @ £25.50 each.
  • 4 units PROD600 @ £12.00 each.

Related topic


Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/