Installing the webchat widget
To get the chat loading on your website, you need to send a <script> tag which will go onto your website and points to the Chat widget on the relevant environment.
| Environment | Script source | 
|---|---|
| DEV | https://dev-chat-loader.smartagent.app/loader/main.js | 
| UAT | https://uat-chat-loader.smartagent.app/loader/main.js | 
| PROD | https://chat-loader.smartagent.app/loader/main.js | 
Script Tag
<script  id="smartagent"  type="module"  defer  src="{SCRIPT_SRC}"  company="{COMPANY_NAME}"  brand="{FACIA_NAME}"></script>Replace the variables in curly braces with the relevant values, which will be provided to you.
Tag Manager
(() => {  let s = document.createElement("script");  s.id = "smartagent";  s.type = "module";  s.src = "{SCRIPT_SRC}";  s.setAttribute("company", "{COMPANY_NAME}");  s.setAttribute("brand", "{FACIA_NAME}");  document.body.appendChild(s);})();Replace the variables in curly braces with the relevant values, which will be provided to you.
Google Tag Manager (GTM)
GTM requires the use of data attributes
<script  id="smartagent"  type="module"  defer  src="{SCRIPT_SRC}"  data-company="{COMPANY_NAME}"  data-brand="{FACIA_NAME}"></script>Support document.write must be enabled in GTM
Replace the variables in curly braces with the relevant values, which will be provided to you.