> 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/pageview-tracking.md).

# Pageview Tracking

## Pageview Tracking in the JENTIS Data Layer

When a visitor navigates to a new page, it's important to submit a **pageview interaction** to the JENTIS Data Layer. This signals that a new page has been loaded and allows proper tracking of that user action.

### `pageview` Command

#### Example Usage

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

#### Mandatory Properties

There are **no required properties** for the `pageview` track command.

#### Optional Properties

| Name              | Description                                            | Type   | Example Value                    |
| ----------------- | ------------------------------------------------------ | ------ | -------------------------------- |
| `breadcrumb`      | An array of breadcrumb navigation elements.            | array  | `["home", "products", "family"]` |
| `group`           | Group the page into one or more categories.            | array  | `["cms", "storelocator"]`        |
| `pagetitle`       | Override the default page title from `document.title`. | string | `"myPageName"`                   |
| `virtualPagePath` | Define a custom URL to replace the browser’s URL.      | string | `"/my/virtual/url.html"`         |

#### Example

```javascript
_jts.push({
  track: "pageview",
  breadcrumb: ["Group1", "Group2", "Group3"],
  group: ["cms", "storefinder"],
  pagetitle: "Store Finder Page"
});
```

### Virtual Pageview Tracking

In single-page applications (SPAs) or other dynamic websites, page transitions may not result in actual browser page loads. In these cases, use the `virtualpageview` command to track virtual navigation.

#### `virtualpageview` Command

**Example Usage**

```javascript
// Example only – do not execute directly
_jts.push({
  track: "virtualpageview",
  virtualPagePath: "/my/virtual/url.html",
  // optional properties
});
```

#### Mandatory Properties

| Name              | Description                                          | Type   | Example Value            |
| ----------------- | ---------------------------------------------------- | ------ | ------------------------ |
| `virtualPagePath` | The URL representing the new location in the browser | string | `"/my/virtual/url.html"` |

#### Optional Properties

| Name         | Description                                            | Type   | Example Value                    |
| ------------ | ------------------------------------------------------ | ------ | -------------------------------- |
| `pagetitle`  | Override the default page title from `document.title`. | string | `"myVirtualPage"`                |
| `breadcrumb` | An array of breadcrumb navigation elements.            | array  | `["home", "products", "family"]` |
| `group`      | Group the page into one or more categories.            | array  | `["cms", "storelocator"]`        |

Use `virtualpageview` to ensure consistent and accurate tracking on websites with dynamic routing or JavaScript-based navigation systems.


---

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