Category: Chat
This integration is only available for Web projects
What to expect
The integration will capture dynamic variables indicating start and end of chatbot usage, and will provide a session replay link back to Ada's "Chatter Info". 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).
What we collect
Dynamic Variables
Key | Value | Data Type |
CH_AD_Chat Started | true | Text |
CH_AD_Chat Ended | true | Text |
What we send
Session replay
To properly make use of the replay feature you need to either have 100% collection ratio or ETR (Event Triggered replay), please talk to your CSM about this.
URL Example: https://app.contentsquare.com/quick-playback/index.html?pid=3771&uu=cc912cdb-ee03-a739-a659-ad2a5b1f08bb&sn=12&pvid=1&recordingType=cs&vd=ad
Implementation
Implementation Steps
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 go to the section How to request an integration to see the instructions to enable this integration. You can then return here once completed.
If you have already completed the step above then continue below.
Verifying it works
You can use the chrome extension to check the results are sent to CS