Embedding Your Bot

You can embed your bot in an external website by adding a snippet of Javascript code to your website.

First, ensure that your bot has been configured to be embeddable by visiting the bot's Config page. (Unless you have changed it, the bot will default to being embeddable.) Then, look for the Tag for Embedding link just below the option for configuring whether your bot is embeddable. The tag looks something like this:

 <script src="https://botmakr.net/embed/MyChatbot"></script>

In the above example, "MyChatbot" will be the path to your bot.

Paste the entire script tag into the HTML source of your website at the spot you want it to be embedded.

Advanced Options

Advanced options can be specified at the end of the embed URL in the form of standard CGI parameters. Current options are:

Option Values Description
header 0 or 1

Whether to display a header above the chat window with the bot's avatar, name, and description. E.g.:

 <script src="https://botmakr.net/embed/MyChatbot?header=0"></script>

height <n> or <n><unit> Height, e.g. 300 for 300 pixels, or 300pt for 300 points. Any valid CSS unit of measurement may be used.

To specify multiple options, separate them with an ampersand (&), e.g.:

 <script src="https://botmakr.net/embed/MyChatbot?foo=bar&baz=bat"></script>

Restricting Domains

You can specify which domains may embed your bot by listing them in the Embeddable Domains window. List each domain on a separate line. For example:

mydomain.com
www.mydomain.com
test.com
www.test.com

They are not wildcards, so if you wish to embed your bot on multiple subdomains you must list them all explicitly (e.g. sub1.mydomain.com, sub2.mydomain.com, sub3.mydomain.com). The most common example would be if your domain will be accessed by both the www- and non-www versions (e.g. www.example.com and example.com), you should list them both.

Domain names listed here are case-insensitive.

If you don't list any domains here, then any domain may embed your bot.