# E-Commerce Tracking

## E-Commerce Tracking with JENTIS

When commercial products or promotional content are involved, there are specific properties and interactions that must be tracked to enable meaningful e-commerce insights. The JENTIS Data Capture Platform (DCP) provides a robust and flexible way to track product, cart, checkout, and promotional activity.

This section provides an overview of the foundational concepts, followed by individual articles for each type of e-commerce interaction.

### Product Type – Key to Success

Each product in the JENTIS Data Layer must have a defined `type`, which indicates the context of the product interaction.

#### Supported Product Types:

* `categoryview`
* `productview`
* `addtocart`
* `removefromcart`
* `cartview`
* `checkout`
* `order`
* `productlist`
* `productlistclick`
* `search`

Products must be tracked with the `track: "product"` command and always include the `type` property.

You can also track **promotions** separately. These are elements such as banners, creatives, or call-to-actions that influence user behavior.

### Dependencies and Consistency

All tracking commands must be called in the correct sequence so they are captured within the same interaction context. This ensures the data is grouped into a single state when `track: "submit"` is called.

#### Example: Order and Product List on Same Page

```javascript
_jts.push({
  track: "product",
  type: "order",
  id: "12345567",
  name: "Baby Oil"
});

_jts.push({
  track: "order",
  id: "order_1"
});

_jts.push({
  track: "product",
  type: "productlist",
  id: "7890",
  name: "Baby Shoes"
});

_jts.push({
  track: "productlist",
  listname: "suggested-products"
});

_jts.push({
  track: "submit"
});
```

### Visual Structure

In a typical setup, multiple products can be associated with different types, such as `productview` or `listview`. These types are resolved into a unified state using the `submit` command.

Example:

* `Product A`: type `productview` → tracked with `track: "productview"`
* `Product B` & `C`: type `listview` → tracked with `track: "productlist"` and a `listname`

All data is packaged together at the end with `track: "submit"`.

<figure><img src="https://2315305008-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy15ncufYr341K5U8q6Of%2Fuploads%2Fgit-blob-efdfce0adee432c4dccd94f7aab72dada64fd093%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Product Object Schema

JENTIS supports standard product properties, and you can extend this object with custom fields. For custom data usage, see [custom-data-layer-definitions](https://docs.jentis.com/developer-guide/data-layer/jentis-data-layer/custom-data-layer-definitions "mention").

#### Tracking Command: `product`

| Name        | Description                                              | Type    | Mandatory | Example               |
| ----------- | -------------------------------------------------------- | ------- | --------- | --------------------- |
| `id`        | Unique product ID                                        | string  | yes       | `"ab12"`              |
| `type`      | Type of ecommerce interaction (e.g. `order`, `cartview`) | string  | yes       | `"currentcart"`       |
| `name`      | Product name                                             | string  | no        | `"Baby Oil"`          |
| `group`     | ERP product groups                                       | array   | no        | `["Small Sortiment"]` |
| `brutto`    | Price incl. VAT                                          | decimal | no        | `14.90`               |
| `netto`     | Price excl. VAT                                          | decimal | no        | `12.42`               |
| `oldbrutto` | Original price incl. VAT                                 | decimal | no        | `18.90`               |
| `oldnetto`  | Original price excl. VAT                                 | decimal | no        | `16.90`               |
| `brand`     | Product brand                                            | string  | no        | `"Milka"`             |
| `quantity`  | Quantity of product                                      | int     | no        | `3`                   |
| `position`  | Position in list                                         | int     | no        | `4`                   |

#### Product Push Example

```javascript
_jts.push({
  track: "product",
  type: "order",
  id: "12345567",
  name: "Baby Oil",
  group: ["Small Sortiment", "Baby"],
  brutto: 123.90,
  netto: 110.90,
  oldbrutto: 150.00,
  oldnetto: 140.00,
  brand: "Milka",
  quantity: 3,
  position: 2
});
```

### Product Type Schemas and Interactions

Each product interaction type (e.g., `productview`, `addtocart`, `checkout`) has its own tracking schema.

> Explore the following individual articles for detailed documentation:

* [product-list-tracking](https://docs.jentis.com/data-capture/web-tracking-setup/set-up-jentis-data-layer/e-commerce-tracking/product-list-tracking "mention")
* [product-view-tracking](https://docs.jentis.com/data-capture/web-tracking-setup/set-up-jentis-data-layer/e-commerce-tracking/product-view-tracking "mention")
* [add-to-cart-tracking](https://docs.jentis.com/data-capture/web-tracking-setup/set-up-jentis-data-layer/e-commerce-tracking/add-to-cart-tracking "mention")
* [remove-from-cart-tracking](https://docs.jentis.com/data-capture/web-tracking-setup/set-up-jentis-data-layer/e-commerce-tracking/remove-from-cart-tracking "mention")
* [cart-view-tracking](https://docs.jentis.com/data-capture/web-tracking-setup/set-up-jentis-data-layer/e-commerce-tracking/cart-view-tracking "mention")
* [checkout-tracking](https://docs.jentis.com/data-capture/web-tracking-setup/set-up-jentis-data-layer/e-commerce-tracking/checkout-tracking "mention")
* [order-tracking](https://docs.jentis.com/data-capture/web-tracking-setup/set-up-jentis-data-layer/e-commerce-tracking/order-tracking "mention")
* [promotion-tracking](https://docs.jentis.com/data-capture/web-tracking-setup/set-up-jentis-data-layer/e-commerce-tracking/promotion-tracking "mention")
