# Install the website chat (/docs/channels/website-chat/install)

> Create a public key, paste one line of code into your site, and follow the steps for WordPress, Wix, Webflow, Shopify, Google Tag Manager or any website.

Type: how-to | Status: ga | Last reviewed: 2026-11-21 | Minimum role: builder

Open the agent, choose **Channels**, **Manage** on Website chat, then the **Install** tab. It is headed "Add chat to your website. Paste one line of code on your site. That's it."

## How do I add the chat to my website? [#how-do-i-add-the-chat-to-my-website]

Open the agent, choose Channels, select Manage on Website chat, then open the Install tab. Copy the one line of code with your public key and paste it into your site. The tab has steps for WordPress, Wix, Webflow, Shopify, Google Tag Manager and any other website.

## Steps [#steps]

<Steps>
<Step>

### Your public key [#your-public-key]

The tab shows the key you have, for example `lwix_pub_KLiIK10E…`. A key's full value is shown only when it is created. Replace `YOUR_PUBLIC_KEY` in the code with the key you saved, or choose **Create another key**.

</Step>
<Step>

### Paste this on your site [#paste-this-on-your-site]

```html
<script src="…/widget.js" data-key="YOUR_PUBLIC_KEY" defer></script>
```

The script address is filled in for you in the studio.

</Step>
<Step>

### Follow the steps for your platform [#follow-the-steps-for-your-platform]

Pick one from the list.

</Step>
</Steps>

## Platform steps [#platform-steps]

<Tabs items={['Any website','WordPress','Wix','Webflow','Shopify','Google Tag Manager']}>
<Tab value="Any website">
Works on any site where you can edit the page HTML.

1. Copy the code.
2. Open your site's HTML and paste it just before the closing `</body>` tag (the `<head>` also works).
3. Publish the change and reload your site. The chat button appears in the corner.
</Tab>
<Tab value="WordPress">
Uses the free WPCode plugin, so you do not have to edit theme files.

1. Go to **Plugins → Add New** and install "WPCode – Insert Headers and Footers".
2. Open **Code Snippets → Add Snippet → Add Your Custom Code** and choose **HTML Snippet**.
3. Paste the code, set **Insertion** to **Site Wide Footer**, and switch the snippet to **Active**.
4. Save, then visit your site to check the chat button.
</Tab>
<Tab value="Wix">
1. In your Wix dashboard open **Settings → Advanced → Custom Code**.
2. Click **+ Add Custom Code** and paste the code.
3. Choose **All pages**, **Load code once**, and place it in **Body – end**.
4. Click **Apply**, then publish your site.
</Tab>
<Tab value="Webflow">
1. Open **Site settings → Custom code**.
2. Paste the code into **Footer code** (before the `</body>` tag).
3. Click **Save changes**, then publish your site.
</Tab>
<Tab value="Shopify">
1. In Shopify admin go to **Online Store → Themes → ⋯ → Edit code**.
2. Open `layout/theme.liquid`.
3. Paste the code just before the closing `</body>` tag and click **Save**.
</Tab>
<Tab value="Google Tag Manager">
1. In Tag Manager create a new tag and choose **Custom HTML**.
2. Paste the code into the HTML box.
3. Set the trigger to **All Pages**, then **Save** and **Publish** the container.
</Tab>
</Tabs>

Chat only loads on sites you have allowed: add yours under **Advanced → Allowed sites** ([Advanced](/docs/channels/website-chat/advanced)).

## How it appears [#how-it-appears]

Under **How it appears** choose where the chat shows up. **Chat window → Opens from a button** shows a launcher. Choose **Chat bubble**, or use your own button with `data-loopwix-open` ([Embed and configure the chat widget](/docs/developers/embed-the-widget)).

## Preview and share [#preview-and-share]

- **Preview on a sample site** lets you see the chat working before you add it to your real site.
- **Create share link** makes "a page of its own with your chat on it, handy for email, social posts or QR codes". See [Full page chat](/docs/channels/website-chat/customise#full-page-chat).

Problems? See [Troubleshooting](/docs/channels/website-chat/troubleshooting).
