Install guide

Installing a chat assistant on BigCommerce

BigCommerce is one of the few platforms that gives third-party scripts their own admin screen rather than making you edit a theme. Script Manager is the right place for this, and using it means a theme update cannot take the widget with it.

The tag

<script src="https://cdn.askably.xyz/w.js" data-key="pk_live_YOUR_KEY" defer></script>

Your own key replaces the placeholder. You will find it on the install tab of the assistant.

The origin the page is served from has to be on the allowlist for that assistant, or nothing renders and the browser console says which origin was refused. An apex domain and its www are two different origins to a browser, so list both, along with any staging or preview host you want it to work on.

Where it goes on BigCommerce

Storefront, then Script Manager, then Create a Script.

Script Manager is available on every BigCommerce plan. Which pages a script may run on, checkout included, depends on your plan and on the script type you choose.

Step by step

  1. 1In the control panel open Storefront, then Script Manager.
  2. 2Choose Create a Script.
  3. 3Name it something a colleague will recognise in a year, and set Location to Footer.
  4. 4Set Select pages where script will be added to All pages.
  5. 5Set Script type to Script, then paste the tag into the box.
  6. 6Save. Script Manager injects it into the storefront immediately, with no theme publish step.

What goes wrong on BigCommerce

Checkout is governed separately

Script Manager treats checkout as its own page category, and whether you may add anything there depends on your plan. Even where it is allowed, an optimised one-page checkout is the last place a floating launcher earns its keep.

Set the script to all pages and accept that checkout is a different problem, or exclude checkout explicitly so the behaviour is a decision rather than an accident.

The preview and the live store are different origins

BigCommerce previews a theme on its own address before you apply it. That address is not your domain, so the allowlist rejects it and the widget does not render in preview even though the script is present.

Add the mybigcommerce.com address to the allowlist if you want previews to work, and remember that a customer never sees that address.

A Stencil theme still caches

Script Manager changes are live instantly in the admin, but the storefront sits behind a content cache. If the tag is in the page source and the launcher still is not showing, check the console for a refused origin before assuming the script did not land.

Origins to allowlist

These are the origins a BigCommerce site is typically served from. List every one you want the assistant to answer on, including the ones only you visit.

  • https://your-store.mybigcommerce.com
  • https://yourdomain.com
  • https://www.yourdomain.com

How the tag behaves, wherever you put it

The rest of this is the same on every platform, so it is worth reading once rather than on each guide.

Loader behaviour
One tag, nothing elseThere is no second file, no stylesheet and no package to install. The tag is the whole install.
Where it goesImmediately before the closing body tag. It works in the head too, because it defers, but the body keeps it out of the way of anything that measures render order.
data-key is requiredWithout it the loader stops and writes a warning to the browser console rather than rendering anything.
It finds itselfThe loader reads the tag it was loaded from, and falls back to the first tag on the page carrying a data-key. Platforms that move or re-inject the tag do not break it.
It installs onceA second copy of the tag on the same page is ignored, so a template that renders twice does not produce two launchers.
Assets follow the tagEverything else it needs is fetched from the same origin the tag was served from, so a proxy or a private domain needs no extra configuration.
The panel loads lateOnly the small launcher is on the page at first. The conversation panel is fetched the first time a visitor opens it, in its own frame.
Styles cannot collideThe launcher renders inside a closed shadow root and the panel inside a frame, so nothing on the host page can restyle either, and neither can restyle the host page.

Set up on BigCommerce for a particular trade

The tag is the same everywhere. What is not the same is which of your pages the assistant can read once it is running, and on BigCommerce that depends on what kind of site this is. These go one level further than this guide.

Taking it off again

Open Script Manager, find the script by the name you gave it, and delete it. Nothing remains in the theme.

Before you remove it

  • Removing the tag stops the widget on that site. It does not delete the assistant, its material, or the enquiries it has already collected.
  • If you are moving the widget to a different host rather than retiring it, add the new origin to the allowlist before you remove the old tag, or there is a window where neither works.

Questions

Should I use Script Manager or edit the theme files?
Script Manager, always. Theme edits are lost when you update or switch themes, and Script Manager entries are not. The only reason to edit a theme is if you need the tag in a specific position inside a specific template, which this does not.
Can I run it on some pages only?
Yes. Script Manager takes a page selection, so you can run it on product and category pages and leave it off the account area. Anything narrower than that is easier to control by pointing it at a different assistant per storefront.
What material should a BigCommerce store index?
Shipping zones and timings, the returns window, the warranty terms, and the web pages you wrote to answer pre-sale questions. Those four cover the majority of what a shopper asks before buying.

Keep reading

Try it on your own material

Upload a document or point it at your site, paste one line of HTML, then ask it something only your business could answer.