# Installation

## Basic Javascript

If you have a website with many pages and a new page refresh every time someone clicks on it, then you will need to use basic JavaScript method. You won't need to create separate actions that trigger when the Assistant appears or updates. Instead, the page refresh itself will trigger the action. To set up basic JavaScript, just follow these steps:

### How to Install

To get the Assistant to appear on your web app simply copy and paste the snippet below before the `</body>` tag on every page where you want the Assistant to appear for website visitors.

{% tabs %}
{% tab title="Website visitors" %}

```
//Set your APP_ID
var ASSISTANT_ID = "ASSISTANT_ID";
```

```
!function(t,e,n){function s(){
    const t=e.getElementsByTagName("script")[0],n=e.createElement("script");
    n.type="text/javascript",n.async=!0,n.src="https://assistant.thrivedesk.io/bootloader.js?"+Date.now(),
    t.parentNode.insertBefore(n,t)}if(t.Assistant=n=function(e,n,s){t.Assistant.readyQueue.push({method:e,options:n,data:s})},
    n.readyQueue=[],"complete"===e.readyState)return s();
  t.attachEvent?t.attachEvent("onload",s):t.addEventListener("load",s,!1)}
  (window,document,window.Assistant||function(){}),window.Assistant("init", ASSISTANT_ID);
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

Copy the `ASSISTANT_ID` from ThriveDesk application > Assistant.


---

# 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://developer.thrivedesk.com/assistant/assistant-for-web/installation.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.
