Script hosting for the FrontierBase chatbot widget.
Only the following is needed on your page. Replace USER_UNIQUE_KEY with your plugin key.
<script
id="FrontierBase"
src="https://cdn.frontierbase.io/chatbot.js"
defer
data-plugin-key="USER_UNIQUE_KEY"
></script>
<script>
(function (w, d, ns) {
var tag = d.getElementById(ns);
var cfg = { pluginKey: tag && tag.dataset ? tag.dataset.pluginKey : undefined };
if (typeof w[ns] === 'function' && w[ns].loaded) {
w[ns]('boot', cfg);
return;
}
if (typeof w[ns] !== 'function') {
w[ns] = function () { (w[ns].q = w[ns].q || []).push(arguments); };
}
w[ns]('boot', cfg);
})(window, document, 'FrontierBase');
</script>
/chatbot.js — Loader (no cache). Loads the versioned bundle.
/chatbot-<hash>.js — Versioned bundle (long cache).