Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Embedding a Chatbot on a Web Page Using a Simple JavaScript Snippet

This documentation aims to guide individuals through the process of embedding a chatbot on a web page using a simple a JavaScript snippet. We will explore different options for embedding the chatbot, launching the chatbot, and integrating the chatbot on your website.

\uD83D\uDCD8 Instructions: Embedding the Chatbot

Before you Start

  • Please be aware that the instructions provided in this documentation are intended for users with an active Orbita account (either 30-day free trial of Express, CallDeflectAI or paid account)

  • You must have received an email from Orbita confirming that your chatbot has been provisioned and containing the unique JavaScript snippet specific to your chatbot.

  • If you haven't received this email or need assistance with your Orbita account, please contact Orbita support for help.

To integrate the chatbot on your website, follow these steps:

  1. Edit the Template - Edit the HTML template of the pages where you want the chatbot to be displayed. This may include your homepage, product pages, help pages, or any other relevant sections of your website.

  2. Paste JavaScript Snippet in Page Footer. The email you receive will contain a snippet like this:

<div id="orbitabot"
data-orbita-init='chatbot'
data-orbita-project-id='[YOUR_PROJECT_ID]'
data-orbita-server-url='https://express.orbita.cloud'
data-orbita-custom-data = '{"org": "[YOUR_ORGANIZATION_TOKEN]"}'
data-orbita-bot-Settings='{"elementId": "orbitabot", "template": "express"}'></div> <script src="https://express.orbita.cloud/chatbot/v3/chat.js"></script>

Insert the JavaScript snippet you received via email in the edited template. The snippet may be placed anywhere within the HTML body.

  1. Save and Publish Template - Save and publish the updated template(s) on your website. Once published, the chatbot will be live and functional, based on the selected launch option.

  2. Refresh the web page - Refresh your web page, you should now see the chatbot icon appearing.

 \uD83D\uDCD8 Instructions - Launching the Chatbot

There are three ways to launch the chatbot on your web page: auto-launch on page load, and launching on chatbot button click/tap. Each option offers a different user experience, allowing you to choose the method that best suits your website's needs.

Launching on Chatbot Button Click/Tap

In this case, the chatbot will launch only when a user clicks or taps on a designated chatbot button. This option gives users control over when they want to interact with the chatbot and can help reduce distractions on the page.

  • This is the default behavior of the chatbot.

  • No additional configuration required to enable this behavior.

Launching on Page Load

With this option, the chatbot will automatically launch and be visible to users as soon as the page loads. This can be useful for providing immediate assistance or information to your visitors.

To launch on Page Load, change the value of the “template” key of the data-orbita-bot-Settings attribute to “expressAutoLaunch”:

data-orbita-bot-Settings='{"elementId": "orbitabot", "template": "expressAutoLaunch"}'>

Launching with Peek View

To launch the bot in “peek view” mode, change the value of the “template” key of the data-orbita-bot-Settings attribute to “expresspeekview”:

data-orbita-bot-Settings='{"elementId": "orbitabot", "template": "expresspeekview"}'>

\uD83D\uDCCB Related articles

  • No labels