Skip to main content

Guide Standalone Snippet

Description

The purpose of this widget is to display a specific guide from a specified knowledge base (KbId).

A guide is a typology of knowledge base content (like a question) where the user can find an answer though a decision tree.

Integration

The installation of the solution is done via the integration of the javascript code snippet before the closing tag </body> on the page or pages where it should be displayed.

HTML

Add in your HTML code a container with an identifier which will display the widget at the location of your choice on the<div id="containerId_OF_YOUR_CHOICE"></div>. This identifier must be specified in the containerId option.

<div id="containerId_OF_YOUR_CHOICE"></div>

JS

Integrate the Javascript snippet just before closing the </body> tag. The Smart Tribune script must be loaded as far downstream as possible in the script loading chain in order to avoid possible conflicts with the scripts present on the client page.

<script type="text/javascript">
window.addEventListener('STGuideStandaloneLoaded', function (e) {
e.detail.init({
kbId: 2,
locale: 'en',
slug: 'my-guide',
containerId: 'st-guide-standalone',
});
});
</script>
<script
type="text/javascript"
async
src="https://assets.app.smart-tribune.com/smart-tribune/GuideStandalone/guidestandalone.main.js"
></script>
info

The domains calling on the specified knowledge base must be declared beforehand directly in the knowledge base configuration in Smart Dashboard by your Account Manager.

Variables list

VariableTypeConditionExampleDescription
kbIdintrequiredkbId : 2Variable specific to each customer, it corresponds to the identifier (system identifier) ​​of the knowledge base to be used. This is available in Smart Dashboard, the content administration interface. The knowledge base already integrating test content is identified by the value: 2. You can find your kbId on the Dashboard home page in the "Select a knowledge base" then "system identifier" box.
localestringrequiredlocale : "fr"It allows the customer to specify in which language the solution should be displayed. This only applies to multilingual knowledge bases.
slugstringrequiredslug: "my-guide"The slug of the guide to display.
containerIdstringrequiredcontainerId: "containerId_OF_YOUR_CHOICE"This is the identifier of the container that will receive the content of your Guide Stand Alone widget
customResponsesarroptionalcustomResponses : [ "tag" ]This variable allows you to specify the customized response contextualization to apply by using the tag system identifier. Note : This variable is an array of string.