Install Chat Widget on Your Website

You can install Chat Widget by inserting 
the Javascript into your website's code.


1. Copy your installation code to the clipboard

It can be found on Project SettingsConfigure chat  > Chat Widget

2. Open your website’s backend

Access the server on which your website is hosted with the tool allowing you to modify the files 
or log in to your respective platform Dashboard.

3. Locate the file that contains the </body> tag

While it might differ depending on how your website is built, the rule of thumb would be to 
search for the files with .html or .php extension.
Usually, it will be either index.html or index.php, 
but there might also be some additional subpages files.

4. Find the </body> tag & add the copied javascript code before it

Paste the copied JavaScript code snippet above the closing </body> tag of your website's source 
code.

If you need to add the logic that needs to be called only after the Chat initialisation, you can use initCallback from spartezSupportChat object.

Example
<script type="text/javascript">
    var spartezSupportChat = {
        url: '...',
        portal: ...,
        //meta: [ // optional, custom metadata to store in the issue created from conversation.
        //    { render: true, name: "Value Name 1", value: val1 }, // "render" values will be displayed in the chat dashboard
        //    { render: false, name: "Value Name 2", value: val2 },
        //],
        // delay: 100, // delay between page load and chat load in milliseconds
        // container: 'spartez-support-chat-container', // ID of the page element that will be replaced by chat
        // iconClass: '', // additional class added to the chat icon
        // chatClass: '', // additional class added to the chat widget
        // locale: 'en-us' // force a specified locale for displaying texts to the user instead of detecting it from the browser
    }
</script>
<script type="text/javascript" src="http://.../download/resources/com.spartez.jira.plugins.support-chat/frontend/js/chat.js"></script>


5. Remember to enable the "Allow adding chat to external web pages" checkbox

6. Check your website 🎉

Hooray! You have successfully integrated Chat Widget with your website! :)