Please first make sure that you have configured the domains for your websites. To integrate your chatbot with Google Tag Manager on your website, you need the API key from the aiaibot script tag, which you can find under Settings -> Chatbot in the Website Integration section.
Copy the API key. The API key corresponds to the part highlighted in the following example:
<script type="text/javascript" src="https://chat.aiaibot.com/bootstrap.js"
data-aiaibot-key="e146a111-6811-4814-9a11-d242243e47b1" defer></script>
Add the following script in Google Tag Manger and replace 'API_KEY' with the copied value:
<script>
var script = document.createElement("script");
script.setAttribute('defer', 'true');
script.setAttribute('data-aiaibot-key', 'API_KEY');
script.src = "https://chat.aiaibot.com/bootstrap.js";
document.getElementsByTagName("body")[0].appendChild(script);
</script>