Integration into Google Tag Manager

First, please make sure that you have configured the domains for your websites. To integrate your chatbot with Google Tag Manager, you will need the code to be found in Bildschirmfoto_2021-01-12_um_10.20.39.pngBildschirmfoto_2021-01-12_um_10.21.45.png under "Website" → "Website Integration".

Bildschirmfoto_2021-01-12_um_10.23.48.png

Copy the API key from your code. The API key does not correspond to the whole block of code that you can copy, it is only the part marked in bold:

<script type="text/javascript" src="https://chat.aiaibot.com/bootstrap.js"
data-aiaibot-key="e146a111-68a7-4814-9a25-d242243e47b1" defer>
</script>

Paste the API key into the following placeholder named API_KEY and copy the section into your Tag Manager:

<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>
Was this article helpful?
0 out of 0 found this helpful