Skip to content

Add live chat to your website

There are two ways to install Parlar: paste one line of code into any website, or use the plugin on WordPress and WooCommerce. Both take a few minutes.

The Install section of your panel’s settings, with example data.

Any website: paste one line

It works on any site where you can add code to the page template.

  1. Create your free account

    Then open Settings in the Parlar panel.

  2. Copy the line under Install

    It already includes your site key.

  3. Paste it on every page, just before </body>

    <script src="https://app.parlar.chat/widget.js"
            data-site="your-site-key" async></script>
  4. List your website under Allowed websites

    Optional, but recommended: the chat then only works on the addresses you list, up to 20.

WordPress and WooCommerce: use the plugin

The plugin adds the chat to every page and, on WooCommerce, sends the cart and signs your customers’ identity.

  1. Install the Parlar plugin

    Upload it in Plugins and activate it.

  2. Add your site key

    In Settings › Parlar, paste the site key from your Parlar panel.

  3. Add the site secret

    Copy it from Settings in your panel. It lets the plugin sign who the signed-in customer is.

  4. Save

    The chat button appears in the corner of your site.

Open the chat from your own button

Add data-launcher="false" to the line to hide Parlar’s button, then open the chat from yours. On WordPress, untick Show the chat button in the corner.

<button onclick="CW.open()">Chat with us</button>

// Also available:
CW.close();
CW.toggle();
// Your own fields on the visitor card
CW.setContext({ plan: 'Pro' });
window.addEventListener('cw:ready', () => {});

Sign your customers’ identity on any site

The WordPress plugin does this for you. On other sites, sign the identity on your server and pass it to the chat before its line. Parlar then shows the person’s name with a Signed-in customer badge.

  • The signature is an HMAC-SHA256, in hexadecimal, of id|email|name|ts with your site secret.
  • ts is the time in seconds. A signature is valid for 48 hours.
  • Keep the site secret on your server. Never put it in the page.
// On your server (Node.js)
import { createHmac } from 'node:crypto';

const ts = Math.floor(Date.now() / 1000);
const hash = createHmac('sha256', process.env.PARLAR_SECRET)
  .update(`${user.id}|${user.email}|${user.name}|${ts}`)
  .digest('hex');
<!-- In the page, before the chat's line -->
<script>
  // ts and hash come from your server
  window.CWSettings = {
    siteKey: 'your-site-key',
    user: { id: '42', email: '[email protected]', name: 'Ana R.',
            ts: 1760000000, hash: '9f2c…' },
  };
</script>

If the chat doesn’t appear

Is the line on the page?

Check that it sits just before </body> and that its site key matches the one in your panel.

Is your website on the list?

If you filled in Allowed websites, the chat only works on those addresses. Add the one you’re testing.

Did you hide the button?

With data-launcher="false", or the WordPress option unticked, the chat only opens with CW.open().

Is the signed identity missing?

Check the site secret, and that ts is in seconds and less than 48 hours old.

Know who’s writing before you reply