Details
Integration Type | Dynamic Variable Prefix |
Chatbot | CH_AD_ |
Implementation
Step 1 - Enabling lazy load & adding Contentsquare code to Ada tag
In order to enable the integration, you will need to change your Ada tag implementation to utilize the lazy loading feature.
- If the Ada tag in your <HEAD> section doesn't contain the "data-lazy" attribute-
Replace it with the following tag-
<script id="__ada" data-lazy="true" src="https://static.ada.support/embed2.js"></script>
- After enabling the lazy load, the Ada chat will require you to manually start the chat bot. Please add this script at the bottom of your <BODY> section, and replace the "account_handle" with your Ada handle-
<script>
window.adaSettings = {
handle: "account_handle",
eventCallbacks: {
chat_started: function (event) {
var evt;
if (typeof window.Event === "function") {
evt = new window.Event("Contentsquare_ADA_Integration_ChatStarted");
} else {
evt = document.createEvent("Event");
evt.initEvent("Contentsquare_ADA_Integration_ChatStarted", true, true);
}
window.dispatchEvent(evt);
},
},
};
window.adaEmbed.start(window.adaSettings);
</script>
Your account handle can be found at the top left corner of your Ada dashboard- - Once deployed, please test and ensure your Ada chatbot is still operational.
Step 2 - Setting up an "Chat Started" indicator
In your Ada dashboard go to Build->Answers, and add a "Fire Event" box to your "Greeting" flow. Name the event "chat_started" like so-
Step 3
Please send an email to our support team, asking for the enablement of the Ada integration.
Verifying it works
You can check that the data is being sent by using the Chrome extension, it should look like the below:


Chat Started & Chat Ended
It is important to mention that a chat will be considered as "Started" only upon the greeting event (not when the chat window is open), and will be considered as "Ended" only when a user has told the chatbot the chat has ended and clicked "End Chat" (not when closing an active chat window, which still retains the conversation status.
Dynamic Variable Possibilities
Var Key | Var Type |
CH_AD_Chat Started
|
Text
|
CH_AD_Chat Ended
|
Text
|