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