Help & documentation
Guides, references and troubleshooting for TDesk.

Adding the chat widget to a site

Every chat widget has a unique site token (it looks like tdsk_XXXXXXXX). You add the widget by dropping one script tag onto your pages — that's it.

The embed code

Under Communications → Chat → (your widget) → Install, copy the snippet and paste it just before </body>:

<script async src="https://panel.tdesk.uk/widget.js"
        data-tdesk-chatbot="tdsk_XXXXXXXX"></script>

The bubble appears bottom-right (or bottom-left, your choice). It loads asynchronously, so it never slows the page.

Install options

  • Plain HTML — paste the script into your template footer.
  • Google Tag Manager — add it as a Custom HTML tag firing on all pages.
  • WordPress — download the ready-made plugin from the Install page, or paste the script into your theme footer.
  • Shopify / Wix / Squarespace — paste the script into the site-wide footer/custom-code area.

Theming & behaviour

  • Colour — set the primary colour to match your brand; the bubble, header and your messages use it.
  • Position — bottom-left or bottom-right.
  • Greeting — the opening line shown when the panel is first opened.
  • Agent name — shown under the widget title.
  • Icon — choose the bubble icon.
  • Proactive greeting — a little teaser bubble that pops after a few seconds to invite the visitor to chat.
  • Allowed origins — optionally lock the widget to specific domains; leave blank to allow anywhere.

Note: the widget file is cached for about a minute, so after a change, hard-reload the host site to pick it up. On some of our own marketing sites the widget is injected automatically — you don't need to paste anything.