> For the complete documentation index, see [llms.txt](https://docs.jentis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jentis.com/data-capture/web-tracking-setup/set-up-jentis-data-layer/heatmap-tracking.md).

# Heatmap Tracking

## Heatmap Tracking

It provides native support for tracking user click interactions on a webpage through the `heatmap` tracking command. It captures the exact element clicked, its position on the page, and contextual page information, and pushes this data to the JENTIS Datalayer for use.

### Tracking Command

* `heatmap`

The plugin listens for `click` events on the document and automatically pushes a `heatmap` event to `window._jts` for every click.

### Example Push

```javascript
window._jts.push({
  track: "heatmap",
  type: "click",
  provider: "piwik_pro",
  element: "#main>div.container>button.cta-button",
  url: "https://example.com/landing-page",
  title: "Landing Page",
  position_x: 482,
  position_y: 216,
  category: "Heatmap events"
}, true);
```

> ✅ The second parameter `true` causes the data to be automatically submitted to the server—equivalent to calling `track: "submit"`.

### Properties for `heatmap`

| Name         | Description                                                                                                                          | Type   | Mandatory | Example                         |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------ | --------- | ------------------------------- |
| `type`       | Interaction type. Currently always `click`.                                                                                          | string | no        | `"click"`                       |
| `provider`   | Heatmap platform identifier.                                                                                                         | string | no        | `"piwik_pro"`                   |
| `element`    | CSS-like path to the clicked element (e.g. ), built from the DOM tree up to the nearest ancestor with an `id`, or the document root. | string | no        | `"#id>div.class>button.class"`  |
| `url`        | Page URL where the click occurred                                                                                                    | string | no        | `"https://example.com/product"` |
| `title`      | Page title                                                                                                                           | string | no        | `"Product X"`                   |
| `position_x` | Horizontal click coordinate relative to the viewport                                                                                 | number | no        | `482`                           |
| `position_y` | Vertical click coordinate relative to the viewport                                                                                   | number | no        | `216`                           |
| `category`   | Event category label, configurable per account via the `Event category label` plugin variable.                                       | string | no        | `"play"`                        |

### When to Use Heatmap Tracking

Track click events across a webpage to build heatmap visualizations to:

* Identify high- and low-engagement areas
* Analyze user interaction patterns per element
* Segment audiences based on click behavior


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.jentis.com/data-capture/web-tracking-setup/set-up-jentis-data-layer/heatmap-tracking.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
