> This page is for Advertising Protection.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.humansecurity.com/llms.txt.

# Deploy the detection tag

This guide explains how to deploy the Ad Click Defense JavaScript detection tag. It assumes you have reviewed the [integration options](/advertising/ad-click-defense/integration-options) guide.

## Prerequisites

Before you begin, ensure your environment meets the following requirements:

* Access to the HUMAN console.
* Ability to modify JavaScript-supported website, page templates, ad delivery configurations, or creative tags.
* You must be able to deploy the HUMAN detection tag alongside the ad creative.

## Deploy the JavaScript detection tag

This is the recommended deployment path for JavaScript-enabled web and mobile web environments. The detection tag uses a lightweight asynchronous script to collect click-related technical and behavioral signals for Click IVT analysis and reporting within the HUMAN dashboard. HUMAN analyzes the pre-click signals and populates aggregate-level reporting in your dashboard within one hour from the time the click took place.

> **Note**
>
> If your environment does not support JavaScript, such as mobile apps or restricted web environments, contact a HUMAN representative for guidance on alternative deployment options.

### Obtain the detection tag

HUMAN will provide you with the HTML markup of the tag(s) and assist with validation. The tag requires the `async` attribute and contains a `data-kvqs` attribute that you must configure.

**`Example of a HUMAN JavaScript detection tag`**

```html title="Example of a HUMAN JavaScript detection tag" wordWrap showLineNumbers={false}
<script src="https://example.human.tag.url/c123456/payload.js?dt=123456789&pd=prd" async="true" data-kvqs="..."></script>
```

The tag consists of the following attributes:

* `src`: A URL to one of several HUMAN owned domains that serve the payload. Also, note that the payload name—`payload.js`—will vary as well as the value of the `dt` and `pd` parameters.
* `async`: The tag should be loaded asynchronously and not block page loading.
* `data-kvqs`: A list of parameters with dynamic values.

### Configure the `data-kvqs` attribute

You must dynamically populate the `data-kvqs` attribute with a single string containing your required parameters. To build this string, follow these formatting rules:

1. Format individual parameters as `parameter=value`.
2. Separate multiple key-value pairs with an ampersand (`&`).
3. Remove all spaces from the string.
4. Apply standard URL encoding to all values.

Example of a HUMAN detection tag with populated values in the `data-kvqs` attribute:

**`Example with populated data-kvqs attribute`**

```html title="Example with populated data-kvqs attribute" wordWrap showLineNumbers={false}
<script src="https://example.human.tag.url/c123456/payload.js?dt=123456789&pd=prd" async="true" data-kvqs="ck=a67e10e8&di=example.com&sr=12345&pp=67890"></script>
```

### Inject dynamic values using macros

Use your ad platform's macro syntax (for example, `${...}`, `%%...%%`, or `{{...}}`) to dynamically inject values at serving time. You must map your platform's macros to the corresponding HUMAN parameters.

**`Example of the HUMAN detection tag with macros`**

```html title="Example of the HUMAN detection tag with macros" wordWrap showLineNumbers={false}
<script src="https://example.human.tag.url/c123456/payload.js?dt=123456789&pd=prd" async="true" data-kvqs="ck={{CLICK-ID}}&di={{DOMAIN-INTENDED}}&sr={{SUPPLIER-ID}}&pp={{PUBLISHER-ID}}"></script>
```

**Parameter mapping:**

* `ck`: A unique impression ID for the click event
* `di`: The full domain where the click will occur, with subdomain and excluding path and protocol
* `sr`: The domain of the supplier, seller, or exchange ID of the traffic source
* `pp`: The publisher ID of the traffic source

> **Note**
>
> The example above is for illustration purposes only. It does not include all the available parameters and should not be used in production. See [Detection tag parameters](/advertising/ad-click-defense/parameters#detection-tag-parameters) for detailed parameter descriptions.

### Insert the tag

Place the fully configured tag at the top-most level of the creative iframe to ensure it executes correctly when the ad renders.

## Next steps

After deploying the detection tag, proceed to the next step based on your chosen integration option:

* **Observer-Path**: No additional steps required. Your data will be available on the [HUMAN Dashboard](/advertising/understand-the-human-dashboard) within one hour from the time the click took place.
* **Observer-Path with real-time Click IVT Response**: Deploy the [real-time API](/advertising/ad-click-defense/integrate-real-time-click-ivt-response) to get IVT decision responses in real time.

Contact a HUMAN representative for validation and support during the deployment process.