> 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/jentis-data-layer-structure/data-layer-and-trigger-use-cases.md).

# Data Layer and Trigger Use Cases

Choose separate or combined submissions for pageviews and e-commerce data.

## Data layer and trigger use cases

This guide shows how `submit` calls shape data-layer states and trigger execution. Learn when to submit pageview and product data separately or together.

Each `submit` sends the data collected since the previous submission.

Use the default pageview flow unless a connector needs one combined payload. Separate submissions are normal for analytics tools such as GA4.

### 1. Default pageview submission

This is the recommended starting point. It matches the default JavaScript option during installation.

```javascript
window._jts = window._jts || [];

_jts.push({
  track: "pageview"
});

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

The `pageview` push adds the page context. The following `submit` creates the submission.

#### JENTIS Tag Manager Configuration

1. Install the tracking snippet on your website with the default `track:"pageview"` option enabled.\
   ![](https://2315305008-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy15ncufYr341K5U8q6Of%2Fuploads%2FDefntT2w92aXQSswHDph%2Fimage.png?alt=media\&token=ed489fc5-e3c8-42c2-a665-19eaf61334a2)
2. Keep the default **JENTIS Data Layer Send** state active.
3. Keep your pageview tags assigned to the default pageview triggers.

The submission activates the configured default triggers. This creates the usual pageview tracking flow.

You can use a **Page Load** or **DOM Ready** state instead. Configure its triggers manually. That approach does not use the out-of-the-box push and submit flow.

Read [Pageview Tracking](/data-capture/web-tracking-setup/set-up-jentis-data-layer/pageview-tracking.md) for supported pageview properties.

### 2. Submit pageview and product data separately

Use separate submissions when page and product data become available independently.

For example, submit the pageview during page initialization. Submit product data when the application has loaded it.

```javascript
window._jts = window._jts || [];

// Submit the page context.
_jts.push({
  track: "pageview"
});

_jts.push({
  track: "submit"
});

// Later, submit the product interaction.
_jts.push({
  track: "product",
  type: "productview",
  productid: "SKU-1234",
  name: "T-Shirt"
});

_jts.push({
  track: "productview"
});

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

The first `submit` triggers pageview tags. The second `submit` triggers product-detail tags.

* ✅ Easy to implement, as no dependency must be resolved and product (ecommerce) and pageview data can be sent and submitted asynchronously with `_jts.push()`
* ❌ Default triggers for combined submission of pageview and product data (ie. the default trigger "Pageview Except Ecommerce") will not recognize that ecommerce data exists and trigger both tags (ie. pageview and productview)

<figure><img src="https://2315305008-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy15ncufYr341K5U8q6Of%2Fuploads%2FMyez5KmEgdz4wvTrojTU%2Fimage.png?alt=media&amp;token=fd195a7b-58ec-4816-8af7-fccaf7b6439b" alt=""><figcaption></figcaption></figure>

In the screenshot you can see the default "Pageview Except Ecommerce" trigger. Which needs product data submitted at the same time as the pageview data, so the trigger understands that both exists at the moment of the trigger evaluation.

It is perfectly fine for many connectors and tags to not use this combined trigger, ie. with GA4 tags. Where it is expected that ecommerce and pageview events are submitted on their own. Some other connectors on the other hand need to submit both events as one stream, in which case it is important to consider a combined submission of ecommerce and pageview data.

#### JENTIS Tag Manager Configuration

1. Use the default pageview trigger for `track: "pageview"`  named "Pageview without exclude".
2. Configure a product trigger for the e-commerce interaction, such as `productview`, or use any default ecommerce event trigger, ie "Order".
3. Assign separate connector tags to those triggers.

Each trigger creates its own tag execution and data stream. A connector tracking both pageviews and product views therefore receives two events.

This is expected behavior. GA4 also represents page views and product views as separate events.

Do not expect product values from the second submission in the pageview tag. They belong to different data-layer states.

### 3. Submit pageview and product data together

Use one submission only when a connector requires page and product data together.

The website application must wait until both data sets are complete. It must then make one `submit` call.

```javascript
window._jts = window._jts || [];

// Push every value before submitting.
_jts.push({
  track: "pageview",
  pagetitle: "T-Shirt"
});

_jts.push({
  track: "product",
  type: "productview",
  productid: "SKU-1234",
  name: "T-Shirt"
});

_jts.push({
  track: "productview"
});

// Submit once after page and product data are complete.
_jts.push({
  track: "submit"
});
```

#### JENTIS Tag Manager Configuration

1. Use the default "Pageview except Ecommerce" (or any similar trigger) for tags that will send pageview data only.
2. Use a default ecommerce related trigger (ie. "Order" or "Pageview") safely, as only either or will execute. Either this ecommerce trigger or the pageview that executes only in case of missing ecommerce data.

The exclusion prevents the pageview tag from firing first. The combined tag then receives page and product values from one state. Connectors that require both data to be a combined stream can now execute accordingly.

This setup needs synchronization in the website application. Do not submit the pageview before product data is ready.

{% hint style="warning" %}
Use this model only when the receiving connector needs one combined stream. Separate submissions are simpler and suit most implementations.
{% endhint %}

### Choose the right model

* Start with the default pageview submission.
* Use separate submissions for independent page and e-commerce events.
* Use one combined submission only for a connector-specific requirement.

See [JENTIS Data Layer Structure](/data-capture/web-tracking-setup/set-up-jentis-data-layer/jentis-data-layer-structure.md) for push, submit, and queue 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/jentis-data-layer-structure/data-layer-and-trigger-use-cases.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.
