> 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/e-commerce-tracking/category-tracking.md).

# Category Tracking

## Category Tracking

Use the `category` and `categoryview` tracking commands to capture when a visitor views a page that presents product categories. This improves the accuracy of interaction tracking for product catalog, category landing pages, or filtered category views.

### Purpose

Category tracking:

* Signals that the user is browsing a **category page**
* Enables better segmentation and reporting on **category-level interactions**

### Tracking Commands

* `category` (for each category shown)
* `product` (if any products are displayed)
* `categoryview` (once per page)
* `submit` (finalizes the state)

### 1. `category` Object

Push one `category` object for each category shown on the page.

#### Mandatory Properties

| Name   | Description                     | Type   | Example       |
| ------ | ------------------------------- | ------ | ------------- |
| `id`   | Internal identifier of category | string | `"C8"`        |
| `name` | Display name of the category    | string | `"Furniture"` |

#### Example

```javascript
_jts.push({
  track: "category",
  id: "C8",
  name: "Furniture"
});
```

### 2. `categoryview` Command

Push this command **once**, after all `category` and `product` pushes are complete.

#### Example

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

No additional properties are required.

***

### Full Example

```javascript
// [START] General Pageview
_jts.push({ track: "pageview" });

// [CATEGORY] Category information
_jts.push({
  track: "category",
  id: "C8",
  name: "Furniture"
});

// [PRODUCTS] Products shown under the category
_jts.push({ track: "product", type: "categoryview", id: "1" });
_jts.push({ track: "product", type: "categoryview", id: "2" });

// [CATEGORYVIEW] Category view summary
_jts.push({ track: "categoryview" });

// [SUBMIT] Final submission
_jts.push({ track: "submit" });
```

### Summary

* Use one `category` push per category displayed
* Trigger `categoryview` once to finalize the interaction
* Include any `product` pushes if products are shown under categories
* Finalize the interaction state with a `submit`

This approach ensures category pages are clearly marked and measurable across your tracking stack.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
