# 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](/data-capture/web-tracking-setup/set-up-jentis-data-layer/jentis-data-layer-structure.md) 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="/files/KAS6MqQCcEK6Bytc4NDN" 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.


---

# 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.jentis.com/data-capture/web-tracking-setup/set-up-jentis-data-layer/customizing-the-jentis-data-layer.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.
