Skip to content
Browse the docs Website widget

Website widget

The website widget puts a chat bubble on your site. Visitors click it, ask a question and get an answer from one of your experts. You paste one line of code into your pages, and everything about how the widget looks is set in Aimy. It needs the Professional plan.

Open the page

Go to Integrations under CONNECT and choose Website widget. Pick the expert the widget should answer as from the Experts list on the left. A green dot beside an expert means it already has a widget. Each expert has its own widget, its own code and its own look.

The panel starts with two rows.

  • Expert name shows which expert this widget belongs to.
  • Embed code holds the code you paste into your site.

Get the embed code

Nothing is created until you ask for it. If the expert has no widget yet, the Embed code row says Not generated yet.

  1. Choose Generate embed code.
  2. The row now shows a line of dots. The code is hidden so nobody reads it over your shoulder. Choose the eye button beside it to show the code, and the eye again to hide it.
  3. Choose the copy button. It copies the whole code, even while the code is hidden.

The code is one <script> line. It ends up looking like this, with your own key at the end.

<script src="https://your-domain/apps/chatbot_service/resources/js/chat-widget.js?embedKey=YOUR_KEY"></script>

The embedKey in the address is the only option the code takes. The look of the widget, the welcome message and the expert are all set in Aimy, not in the code, so there is nothing else to add to the line.

Paste it into your site

Paste the line into the HTML of your site just before the closing </body> tag, on every page where the bubble should appear. How you reach that spot depends on how your site is built.

  • On a site you edit as HTML, add it to the page template or to each page.
  • On WordPress, Shopify, Wix and similar builders, look for a setting called something like Custom code, Footer scripts or Header and footer and paste it there. Your site builder's own help will name the exact place.

Save and publish your site, then open one of the pages. The bubble should appear in the corner you chose. If your site has a cache, clear it first.

Anyone can see this line by viewing your page source. It lets people chat with this one expert and nothing else. If you think someone is misusing it, use Regenerate key, described below.

What visitors see

The first time a visitor opens the bubble, the widget asks for their Name and Email, and an optional Contact Number, then they choose Start Chat. Name and email are required, and the email must look like an email address. After that they see your welcome message and can type their question.

If you would rather visitors start chatting straight away, turn off Ask for visitor details in the customiser below. Visitors then go straight to your welcome message, and their conversations show as Anonymous in History. If one of them asks for a person, your team will not have an email to reply to, so ask for one in the chat if you need it.

The widget keeps the details, and the conversation so far, for that browser tab only. A page reload in the same tab carries on where the visitor left off, showing the last 20 messages. A new tab, or the same site opened again after the tab was closed, asks for the details again and starts a new conversation. Each conversation appears in History with the source Website widget. See History.

The rest of the widget is deliberately small.

  • The message box holds up to 500 characters. Enter sends, and Shift with Enter starts a new line.
  • When the visitor's browser supports speech recognition, a microphone button sits in the same spot as the send button. Click it and speak, and the words are typed in. It swaps to the send button as soon as there is text, and it stays while the visitor is dictating so they can stop. Firefox has no speech recognition, so it shows the send button only.
  • Pressing Esc closes the widget.
  • A paperclip is shown beside the message box, but it is switched off. Visitors cannot attach files.
  • Answers show no sources, and there are no feedback, regenerate or export buttons. A line under the box says AI generated replies may be inaccurate and to verify important information. You cannot change that line.
  • Formatting is limited to bold, italic, code and line breaks. Lists and links in an answer show as plain text.
  • On a small phone the window fills nearly the whole width of the screen.
  • If a person from your team has taken over the conversation, their replies appear as ordinary messages. The widget checks for them every few seconds while the page is open. There is no button for asking for a person. It happens when the visitor writes that they want one. See Handing a chat to a person.
  • If the expert is switched off, the widget shows This expert is currently unavailable., and the message box is disabled.

A visitor who sends an unusually large number of messages from one address can be blocked automatically. That visitor sees a message saying abuse was detected and that they are temporarily blocked from sending messages, and that if they think it is a mistake they should contact the owners of the website. You can see who was blocked, let them back in, and change when the check runs, under Blocked visitors further down this page.

Customise the widget

Once a code exists, the same page shows the customiser. The settings are on the left and a Live preview sits on the right on a wide screen. The preview changes as you type, so you can see each setting before you save.

RowWhat it does
Expert avatarThe round picture in the widget header. Click the avatar itself to upload a photo. JPG, PNG, GIF and WebP pictures are accepted, and the picture has to be under 2 MB. A Crop avatar window opens: drag the picture to move it, slide to zoom, and keep in mind that the circle is what visitors see. Choose Use photo to upload it, or Cancel. The new avatar is saved straight away. A Remove button appears once there is an avatar. Without one, the widget shows the letters AI.
Widget titleThe heading at the top of the widget. Up to 30 characters. It starts as "Chat with us".
SubtitleOptional. A short line under the title. Up to 40 characters. For example, "We usually reply in seconds".
Primary colorThe colour of the header, the bubble and the send button. Pick it with the colour box, type a hex value such as #0E76BC, or click one of the eight swatches underneath.
Display styleWelcome box shows a card with your title and welcome message when the widget opens. Chat msgs shows the welcome message, and any additional messages, as chat bubbles from the expert.
PositionWhich corner the bubble sits in: Top L, Top R, Bot L or Bot R. The default is bottom right.
Welcome messageThe first thing visitors read. Up to 200 characters. It starts as a short greeting that offers help.
Additional messagesOnly used with Chat msgs, and greyed out otherwise. Write one message per line. Each line appears as its own bubble after the welcome message, for example a line suggesting what visitors can ask about.
Ask for visitor detailsOn to start with. Visitors fill in their name and email before they can chat, so you can see who they are in History. Turn it off to let anyone start chatting straight away. The preview does not show the form, only the chat.
Agent modePoint at the (i) beside the label to read what it does. In short, the expert breaks a question into steps, searches for each one and checks its work before answering. It does better on hard, multi part questions and uses less of your plan than the older method. It is on by default. Turn it off only if you want the simpler one pass search. If you do not see this row, it is not available on your workspace and you need to do nothing.
Model for this channelOptional. Leave it on Use expert's model (default), or choose another model for the widget only. It saves as soon as you choose it. See How integrations work.

At the bottom, Save widget applies your changes. A site that already shows the widget picks them up the next time a visitor loads a page, so you do not change the code on your site. Reset to defaults puts the title, colours, messages and position back to their starting values. It does not touch your avatar, the visitor details switch or the agent mode switch, and nothing changes on your site until you press Save widget afterwards.

Blocked visitors

When one visitor has sent a set number of messages, Aimy reads the conversation for abuse. If it finds abuse, that visitor can no longer use this expert on your website or on Telegram. The Blocked visitors section, under the widget settings, is where you manage this for the expert you picked.

  • Automatic blocking switches the check on or off. It is on to start with. With it off, nobody is blocked automatically.
  • Check after is how many messages one visitor can send before the check runs. It starts at 25. Type a new number and click Save.
  • Below that is everyone the check has caught, newest first, with their name or email if they gave one, their address, how many messages they sent and the reason the check gave.

Each person has a status and a button:

StatusWhat it meansWhat you can do
BlockedThey cannot use this expert.Unblock lets them back in straight away.
FlaggedThe check was not sure, so they are not blocked yet.Block blocks them. Dismiss marks them as fine.
ClearedSomeone unblocked or dismissed them.Block again if you change your mind.

Every block and unblock is recorded in Audit logs.

Regenerate the key or remove the widget

Two buttons sit beside the embed code.

  • Regenerate key makes a new code and stops the old one working. Aimy asks you to confirm. Use it if the code has been misused, then paste the new code into your site.
  • Remove widget switches the widget off. Aimy asks you to confirm. The code on your site stops working, and the page goes back to Generate embed code. You can generate a fresh one later.

If the bubble does not appear

  • Check that the line is on the page you are testing, and that your site was published after you added it.
  • Check the code in your page is the current one. After Regenerate key an old copy stops working.
  • Check the expert still has a widget. After Remove widget the dot beside the expert is no longer green.
  • If the widget says This expert is currently unavailable., the expert is switched off. Open Experts, choose the expert and look for Activate. The same message can appear when your plan has lapsed or changed. If visitors instead see that the expert is temporarily unavailable and to try again later, your plan's usage allowance for the period has run out. See Plans.
  • If a visitor says they were blocked from sending messages, their address was flagged for sending an unusually large number of messages. Find them under Blocked visitors on this page and click Unblock.
  • If visitors are asked for their name and email again, that is expected in a new tab or after the tab was closed. To stop asking at all, turn off Ask for visitor details.
  • If the bubble loads but answers badly, the cause is the expert, not the widget. See Instructions and Documents.