---
title: "Add chat widget to your Confluence page"
canonical: "https://support.appfire.com/space/CHAT/1997373488/Add%20chat%20widget%20to%20your%20Confluence%20page"
format: markdown
---
> Macro (aura-html)

If you're using [Scroll Viewport](https://marketplace.atlassian.com/apps/1211636/scroll-viewport-for-confluence?tab=overview&hosting=cloud), you can display the Chat widget on your Confluence pages by adding a small snippet of code. This allows your users to interact with your Jira Service Management project directly from your Confluence-powered help center.

## How to add the chat widget to your Scroll Viewport site

1. In the Scroll Viewport plugin, add the JavaScript code below to the custom JavaScript section:

```
vp.loadScript('https://cdn.chat.appfire.app/app/widget-prod/get-chat.min.js').then(() => {
  console.log("Chat has been loaded successfully!");
});

document.body.innerHTML += `<chat-widget jira-id="your-jira-id"
service-desk-id="your-service-desk-id"></chat-widget>`;
```

2. Replace the placeholders:
  - `your-jira-id`: Use the **Jira ID** from your Chat for JSM settings.
  - `your-service-desk-id`: Use the **Service Desk ID** associated with your support project.
  - To find this information, navigate to your Chat for JSM **Settings** page, and under *Website*, click **Installation instructions**.
3. After adding the code, make sure to test the widget on your site's desktop and mobile phone versions.