# Main Code

The main code allows you to automatically display the floating trustmark and manually add [inline trustmarks](/docs/installation/inline-trustmarks.md) across you sites. We recommend adding the code before the closing `</body>` tag in your `footer` template file.

```html
<script type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></script>
```

{% hint style="info" %}
When adding a new site to your account, you'll need to add this code to the home page for verification that it is installed.
{% endhint %}

### Optional Parameters

You can set the position of the trustmark from your TrustedSite dashboard. However, if you'd like to programmatically modify the trustmark position or test it on non-certified site ([demo trustmark](/docs/installation/main-code/demo-trustmark.md)), you can use the following parameters.

```
<script type="text/javascript" src="https://cdn.ywxi.net/js/1.js?demo=1&postion=bottomLeft&offset=15" async></script>
```

<table><thead><tr><th width="152.48046875">Parameter</th><th width="111.40234375">Required</th><th>Value</th></tr></thead><tbody><tr><td>demo</td><td>No</td><td><code>1</code> = demo mode (For use in an editor or non-certified site)</td></tr><tr><td>position</td><td>No</td><td><code>bottomLeft</code> or <code>bottomRight</code></td></tr><tr><td>offset</td><td>No</td><td>Pixel offset from edge of screen. If <code>tm_position</code> is set, this defaults to <code>0</code>. We recommend <code>15</code>.</td></tr></tbody></table>


---

# 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.trustedsite.com/docs/installation/main-code.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.
