# Customizing the JENTIS Data Layer

The JENTIS Data Layer is built to be **flexible** and **scalable**, allowing you to track additional data or create entirely new data objects tailored to your specific website and business needs.

This article will show you how to:

* Extend existing tracking commands with custom properties
* Create entirely new custom documents
* Access these custom properties via the JENTIS Tag Manager

### 1. Extending Default Data Layer Calls

You can enhance existing tracking commands—such as `pageview`, `product`, or `event`—by adding your own custom properties.

#### Example

```javascript
_jts.push({
  track: "pageview",
  pagetype: "productdetailpage"
});

_jts.push({
  track: "product",
  type: "productview",
  id: "12345567",
  name: "jentis tshirt",
  origin: "24"
});

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

In this example:

* The `pageview` object includes a custom property `pagetype`
* The `product` object includes a custom property `origin`

#### Notes

* Every property belongs to the document it's pushed with.
* Reserved keys: `track` and `type` — do **not** use these as custom property names.

### 2. Creating Custom Documents

You can define completely new object types if your use case is not covered by the default JENTIS model.

#### Example: Reservation Tracking

```javascript
_jts.push({
  track: "reservation",
  hotel: "my hotel"
});

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

This defines a new document of type `reservation`, with the custom property `hotel`.

> 📌 Refer to the [Data Model Reference](https://docs.jentis.com/data-capture/web-tracking-setup/set-up-jentis-data-layer/jentis-data-layer-structure) to avoid naming collisions with default keys.

### 3. Accessing Custom Properties in JTM

Once your custom data is pushed into the JENTIS Data Layer, you need to **create variables** in the JENTIS Tag Manager to use them.

#### Step-by-Step

1. Go to **Variables** in JENTIS Tag Manager
2. Click **New Variable**
3. Select **Get JTM Data Layer Value**

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

#### Important Input Fields

* **Document**: e.g., `pageview`, `product`, `reservation`
* **Property**: e.g., `pagetype`, `origin`, `hotel`

Once created, this variable can be used in:

* Triggers (e.g., fire a tag when `pagetype = productdetailpage`)
* Tags (e.g., pass `origin` as a parameter to an analytics tool)

### Summary

* Extend default tracking commands with custom fields
* Define entirely new custom tracking objects if needed
* Access custom data through JTM variables by linking **document** and **property**
* Reserved keys like `track` and `type` must not be overridden

This level of flexibility ensures that your tracking strategy can scale and adapt as your platform evolves.
