PedibeeHelp

Install the chat widget

Put your support bot on your website with one line of code, choose where it shows, and go live.

The chat widget shows your support bot on your website. Visitors select the chat button, ask a question and get an answer from your bot as it is written.

Before you start

  • Your bot needs knowledge to answer from. See Add knowledge.
  • Managers and the owner change the install settings. Everyone in the workspace can see them.

Add the code

  1. Open Support bot, then the Install tab.
  2. Select Copy snippet.
  3. Paste it into your website just before the closing </body> tag, on every page where the chat should appear.

The snippet looks like this:

<script src="https://app.pedibee.com/widget.js" data-bot="pkb_…" async></script>

The chat button shows in the bottom right corner. To move it to the left, choose Left under Side on the Setup tab, then save. You don't need to change the snippet. See Look.

A data-position on the script tag still works, and it wins over the setting. Snippets with data-position="left" keep the button on the left:

<script src="https://app.pedibee.com/widget.js" data-bot="pkb_…" data-position="left" async></script>

The chat button also shows the icon you chose on the Setup tab: a chat bubble, a headset or your logo. If your website limits where images load from, see Sites with a Content Security Policy.

If the chat is open when the visitor moves to another page of your site, it opens again there. Visitors close it with the button, the cross or the Esc key.

The chat can also open by itself when your team starts a chat with a visitor from the Live tab. See Live visitors.

Choose your websites

The chat only appears on the websites you list. Other sites can't show your chat, even if they copy your snippet.

  1. Under Websites, add each address, like https://example.com. Select Add website for another row.
  2. To allow every subdomain, write https://*.example.com. This doesn't include example.com itself, so add both if you need both.
  3. Select Save websites.

You can list up to 10 websites. Changes reach your websites within about a minute.

Each address is a website, not a page:

  • Write the address without a path. https://example.com/help isn't accepted. The chat works on every page of a listed website.
  • https:// is added if you leave it out. Plain http:// isn't accepted.
  • https://www.example.com and https://example.com are different websites. List the ones your site uses.
  • A website on another port needs that port, like https://example.com:8443.
  • IP addresses aren't accepted.

Some wildcards aren't accepted because they would cover other companies' websites too:

  • A whole domain ending, like https://*.com or https://*.co.uk.
  • A hosting service that gives every customer a subdomain, like https://*.github.io, https://*.vercel.app, https://*.netlify.app or https://*.myshopify.com. List your own address there instead, like https://acme.github.io.

If you list no websites, the chat only works on its own page.

Go live

Select Go live. Once your page loads again, the chat button appears on your listed websites.

Going live can be refused:

  • Add knowledge your bot can answer from before going live. The bot needs at least one ready page, file, text or Q&A pair.
  • The chat widget isn't set up on this server yet, or the bot's AI model isn't set up on this server yet. Contact us.

You can also change the status on the Setup tab. The same checks apply there.

Select Pause chat to take the chat down. The button disappears from your websites when the page loads again. Visitors who have the chat open see "This chat isn't available right now." Select Go live again to bring it back.

Your chat page

Every bot also has its own page. Its link is under Status on the Install tab. Link to it from emails, your help centre or anywhere else. The page works whatever websites you list, but only while the bot is live. The Continue the chat link in our emails to visitors opens the chat on this page. See Your inbox.

Open the chat from your own button

The widget adds window.Pedibee to your page:

window.Pedibee.open();   // opens the chat
window.Pedibee.close();  // closes it
window.Pedibee.toggle(); // opens it if closed, closes it if open

For example:

<button type="button" onclick="window.Pedibee && Pedibee.open()">Chat with us</button>

The chat button still shows in the corner. Calling Pedibee.open() before the widget is ready opens the chat as soon as it is.

Sites with a Content Security Policy

If your website sends a Content-Security-Policy header, allow the Pedibee app in it:

  • script-src must allow https://app.pedibee.com, so the widget can load.
  • frame-src must allow https://app.pedibee.com, so the chat can show.
  • img-src must allow https://api.pedibee.com when the chat button shows your logo. Without it, the button shows the chat bubble.

A strict policy also blocks inline onclick attributes. Attach the click handler from your own script file instead:

document.getElementById("chat-button").addEventListener("click", () => window.Pedibee?.open());

Troubleshooting

  • The button doesn't appear.
    • Check the status on the Install tab is Live.
    • Check the page's website is in your list exactly: https://, the right subdomain (with or without www) and the port if it has one.
    • Check the snippet is on the page, and reload it.
    • Open your browser's console. "Refused to frame" means the website isn't in your list, or the data-bot value is wrong. "data-bot is missing or wrong" means the snippet was changed. Copy it again.
    • If your site has a Content Security Policy, check it allows the app. See above.
  • The chat says "This chat isn't available right now". The bot is paused, or it was paused while the visitor was chatting.
  • The chat says "This chat was not found". The bot was deleted, or the link is wrong.
  • Visitors are asked to check a box. Cloudflare Turnstile protects the chat from automated traffic. Most visitors never see it. If a content blocker stops it, the chat says so and asks the visitor to allow challenges.cloudflare.com.
  • The bot answers "Our assistant can't answer right now". Your workspace used this month's conversations, or the day's safety limit. See Limits and privacy.

Signed-in visitors

Call Pedibee.identify() so the bot can answer from a visitor's own account, and Pedibee.logout() when they sign out. See Answer from a visitor's account.

On this page