# Setup guide

## Install the Tag :package:&#x20;

To install the JavaScript SDK on your site, simply copy and paste the following lines into each page of your website. These lines can be inserted at the end of the tag or via a tag management system (TMS) such as [Commander Act](https://www.commandersact.com/en/) or [Google Tag Manager](https://tagmanager.google.com/).

```javascript
<script>
(function(v,easy,bl) {
    v = easy.createElement("script");
    v.type = "text/javascript";
    v.async = true;
    v.src = bl;
    (easy.head || easy.body).appendChild(v);
})(this, document, "//m.vzbl.eu/js/[retailer].js")
</script>
```

*You should replace \[retailer] with your retailer code*

This method ensures that the tag execution does not block the loading of other page elements, thus minimizing the impact on the overall performance of the site. ⌛

## Content-Security-Policy

If your site uses a Content Security Policy (CSP) to enhance its security, it is necessary to add the sources used by our tag to the list of allowed sources in your CSP. The required configuration includes allowing script loading via the `unsafe-inline` directive.

```javascript
script-src 'unsafe-inline' https://*.vzbl.eu
```

We use XMLHttpRequest and the Beacon API to transmit data to our servers. Therefore, it is necessary to authorize our domains in your security configuration.

```javascript
connect-src https://*.vzbl.eu
```

## When to load script?

The script loading must be triggered as soon as the page is displayed. You should place the script before the closing `</body>` tag on all pages of the site.

If you are using a TMS, install the script on all pages of the site and choose to execute the script on the "**Dom Ready**" event.

## Events&#x20;

When the library is loaded, it registers and transmits events occurring on the page where the sponsored ads were displayed. As a result, impressions and clicks are collected and processed to evaluate the performance of the campaigns.


---

# 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.veasybl.io/en/setup-guide.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.
