# Install the JENTIS Tracking Snippet

Integrating a JavaScript code snippet is necessary to begin collecting data with JENTIS on your website.

We suggest inserting this code snippet as high as possible within the HTML head section of your website. This will create the optimal conditions for a stable and reliable data stream.

{% hint style="info" %}
Inserting the tracking code snippet directly on your website and not via third-party tools is essential.
{% endhint %}

{% hint style="warning" %}
**Please do not copy/paste the following snippet or parts of it. The following code is just a visual example.**\
You will find your code in your JENTIS account (Containers -> Setup).
{% endhint %}

{% code lineNumbers="true" %}

```js
// DO NOT COPY - JUST FOR VISUAL REFERENCE
<script>window._jts = window._jts || [];</script>
<script async src="https://<trackdomain>/<filehash>"></script>
```

{% endcode %}

{% hint style="warning" %}
You will find your exact JavaScript snippet by creating a new container or editing an existing one
{% endhint %}

<figure><img src="/files/G6Gnk704tsV8XRiU2ceM" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="144.5">Placeholder</th><th width="316.59375">Description</th><th width="82.08984375">Type</th><th>Example</th></tr></thead><tbody><tr><td>&#x3C;trackdomain></td><td>Your JENTIS container DNS Domain. This will be replaced in your individual JTM container automatically when the code is generated in the UI.</td><td>string</td><td>hhd728ju.example.org</td></tr><tr><td>&#x3C;filehash></td><td>A unique identifier for a container source file. This will be replaced in your individual JTM container automatically when the code is generated in the UI.</td><td>string</td><td>hj8kds</td></tr></tbody></table>

## Testing <a href="#jentiscodesnippet-testing" id="jentiscodesnippet-testing"></a>

If you have correctly set up the JENTIS tracking code snippet, you can find a network log entry (HTTP stream) in your browser's developer tools.

The resource loaded looks like the following:

```none
https://<hash>.example.at/<filehash>.js
```

To ensure the JENTIS script is loaded correctly, the DNS A record must be set. For more information, read the article [DNS Setup](/getting-started/quickstart/make-tracking-first-party-set-your-dns.md).

After these steps, the script will load and respond with a 200 status code. A secure connection can now be established, and your JavaScript is available.

Your configuration will also be automatically verified within up to 30 minutes after you set up the JENTIS tracking code snippet on your website. Alternatively, you can return to your container’s configuration and click **Verify**.

You can always check the status of your HTML Code on your containers' configuration:

<figure><img src="/files/1XZ4ahpOFVruCT74mfzY" alt=""><figcaption></figcaption></figure>

## Start Tracking <a href="#jentiscodesnippet-starttracking" id="jentiscodesnippet-starttracking"></a>

### Implementing Pageview Tracking with JENTIS

To start tracking with JENTIS, use the following JavaScript function calls. These commands enable automatic tracking whenever a page is visited.

Add the following lines of code to your web application:

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

## **Alternative Method**

Alternatively, under the [Codes](/jentis-dcp-elements/codes.md) section, insert the code snippet as a custom element within your JENTIS account. This ensures that a pageview is tracked each time the basic JENTIS tracking code snippet is executed.

***

If you have any questions or suggestions, contact us through our [Helpdesk](https://jentis.atlassian.net/servicedesk/customer/portal/1).


---

# Agent Instructions: 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:

```
GET https://docs.jentis.com/data-capture/web-tracking-setup/install-the-jentis-web-tag.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
