# Event Tracking

## Event Tracking in the JENTIS Data Layer

An **event** in JENTIS represents a wide range of user interactions or browser-side actions—both **active** (e.g. clicks) and **passive** (e.g. timers, impressions). Events are highly flexible and can be customized for almost any kind of interaction you want to track.

### `event` Command

#### Example Usage

```javascript
// Example only – do not execute directly
_jts.push({
  track: "event",
  // mandatory and optional properties
});
```

### Mandatory Properties

| Name    | Description                                                 | Type   | Example Value         |
| ------- | ----------------------------------------------------------- | ------ | --------------------- |
| `group` | A category to group and summarize similar events.           | string | `"navigation-clicks"` |
| `name`  | A specific name for this event (e.g. `list_view`, `click`). | string | `"submit-button"`     |

### Optional Properties

| Name             | Description                                                                               | Type   | Example Value |
| ---------------- | ----------------------------------------------------------------------------------------- | ------ | ------------- |
| `value`          | Additional description or label related to the event.                                     | string | `"click"`     |
| `numvalue`       | A numeric value associated with the event (e.g. revenue, quantity).                       | number | `299`         |
| `interactive`    | Marks the event as interactive (`true`) or non-interactive (`false`). Defaults to `true`. | bool   | `true`        |
| `noninteraction` | **Deprecated** – Use `interactive` instead.                                               | bool   | `false`       |

### Example

```javascript
_jts.push({
  track: "event",
  group: "E-Commerce",
  name: "Product-Impression",
  value: "0023775322",
  numvalue: 299,
  noninteraction: true // Deprecated – use "interactive: false" instead
});
```

### Submitting Events

When an event is pushed using the `track: "event"` command, the **JENTIS Data Layer will immediately trigger a state**, submitting all accumulated data to the server.

This ensures the event and any previously pushed relevant data are sent together in a complete payload.

To track advanced interactions like e-commerce funnels, form submissions, or impressions, simply follow this syntax and customize your `group` and `name` values accordingly.


---

# 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/event-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.
