# JavaScript Embed

### Getting Started

For each integration, you need to create an embed code in Boatvertizer. Go to "Tools > Embed".

Each embed code consists of two lines of code containing a token:

{% code title="Boatvertizer Embed Code" %}

```html
<div id="boatvertizer" data-token="..." data-language="en"></div>
<script src="https://embed.boatvertizer.com/v1/loader.js"></script>
```

{% endcode %}

Simply copy and paste this code (including your embed token) and integrate it into the body of your website. The ads will be rendered automatically into the site.

For technical reasons, it is not possible to integrate more than one embed on a single HTML page.

### Changing the language

To change the language of the integration, simply set the language code in the data-language attribute.

<pre class="language-html" data-title="Language Code"><code class="lang-html">&#x3C;div id="boatvertizer" data-token="..." data-language="<a data-footnote-ref href="#user-content-fn-1">it</a>">&#x3C;/div>

</code></pre>

#### Available languages

`en, de, fr, it, es, pt, nl, dk, se, fi, no, pl`

### Page Header Offset

If a visitor clicks on an ad in your embed, the browser will focus on top of the detail view of the ad. If you have a large page header and you want to keep this page header visible, you can define a offset value in pixels:

{% code title="Offset Value" %}

```
<div id="boatvertizer" data-token="..." data-offset="150"></div>
```

{% endcode %}

With this offset value set, the detail view will open with x pixels of the page header visible.

[^1]: Language Code


---

# 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.boatvertizer.com/embed-ads-on-your-website/embed.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.
