# E-commerce tracking

In addition to reservations, e-commerce products purchased at time of booking, such as events, experiences, ancillary items or other, can be tracked and measured.

The e-commerce products should be added to the [Confirmation page snippet](https://docs.flip.to/integrations/booking-engines/set-up-your-booking-engine#confirmation-page-snippet). Below is an example, followed by the supported fields.

```javascript
<!--Flip.to - Confirmation Page Start-->
<script>
	!function(n,e,w){
		w.eventData={category:'Booking_Engine',action:'Load',value:w.amount};
		(n[e]=n[e]||[]).push({flipto:w,event:'flipto.confirmation.load'});
	}(window,'fliptoDataLayer',
	{
		bookingEngine: '[BOOKING-ENGINE]',
		companyCode: '[COMPANY-CODE]',
		code: '[PROPERTY-CODE]',
		confirmation: '67890',
		loyalty: '12333322',
		first: 'John',
		last: 'Smith',
		email: 'jsmith@flip.to',
		phone: '(212) 123-4567',
		startDate: '2025-4-10',
		endDate: '2025-4-13',
		guests: 5,
		adults: 3,
		children: 2,
		type: 'KING',
		rateCode: 'BAR',
		language: '[LANGUAGE-CODE]',
		currency: 'USD',
		amount: 1234.12,
		addonAmount: 234.56,
		dateFormat: 'yyyy-M-d',
		products: [
		    {
		      id: "ABC",
		      name: "Wine Tasting Tuesdays",
		      category: "Event/Onsite/Wine",
		      price: 100,
		      currency: "USD"
		    },
		    {
		      id: "DEF",
		      name: "Sunglasses",
		      brand: "Oakley",
		      category: "Womens/Apparel",
		      price: 200.50,
		      inventory_status: "in stock",
		      currency: "USD"
		    }
		  ] 
	});
</script>
<!--Flip.to - Confirmation Page End-->
```

<table><thead><tr><th width="155.5390625">Field</th><th width="478.89453125">Description</th><th width="106.4765625" data-type="checkbox">Required</th></tr></thead><tbody><tr><td>id</td><td>SKU or product ID.</td><td>true</td></tr><tr><td>currency</td><td>Currency in which the product is being priced (ISO 4217).</td><td>true</td></tr><tr><td>price</td><td>Price of the product at the current time, supplied as a valid number including a decimal point if appropriate.</td><td>true</td></tr><tr><td>name</td><td>Name or title of the product.</td><td>false</td></tr><tr><td>category</td><td>Category the product belongs to. Use a consistent separator to express multiple levels, e.g., <code>Event/WineTasting</code> or <code>Womens/Apparel</code>.</td><td>false</td></tr><tr><td>list_price</td><td>Recommended or list price of a product.​List price should be supplied as a valid number including a decimal point if appropriate.</td><td>false</td></tr><tr><td>quantity</td><td>Quantity of the product taking part in the action.​Quantity should be supplied as a valid number including a decimal point if appropriate.</td><td>false</td></tr><tr><td>size</td><td>Size of the product, e.g., <code>XL</code>, <code>XS</code>, <code>M</code>.</td><td>false</td></tr><tr><td>variant</td><td>Variant of the product, e.g., <code>Red</code>, <code>Heavy</code>, <code>Leather</code>.</td><td>false</td></tr><tr><td>brand</td><td>Brand of the product.</td><td>false</td></tr><tr><td>inventory_status</td><td>Inventory status of the product, e.g., <code>in stock</code>, <code>out of stock</code>, <code>preorder</code>, <code>backorder</code>.</td><td>false</td></tr><tr><td>creative_id</td><td>Identifier/Name/Url for the creative presented on a list or product view.</td><td>false</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flip.to/docs/integrations/booking-engines/e-commerce-tracking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
