Inserting a Chatbot code into Qualtrics | XM Community
Skip to main content

Hi everyone,
For my master thesis i would like to research chatbots. In order to do this i would like to have some sort of frame where participants are able to interact with a chatbot through some sort of embedded square in the survey. The research really focuses on interacting with the chatbot in that environment so i would like to apply the following script into a page so people can interact with it:

">https://static.landbot.io/landbot-widget/landbot-widget-1.0.0.js">




This script came directly from the landbot website, and i would like to know if it is possible to create a page where people see this embedded chatbot, so that they can interact with it. Unfortunately, i was not able to add this into qualtrics. Perhaps you guys could help me out, or present an alternative!

Thanks in advance!

Hi, Please add below JavaScript code into question
Qualtrics.SurveyEngine.addOnReady(function () {
    var $this = jQuery(this.questionContainer);
    jQuery(".QuestionBody", $this).append('

');

    function onLandBotWidgetLoaded() {
        var myLandbot = new LandbotFrameWidget({
            container: '#myLandbot',
            index: 'https://landbot.io/u/H-201854-TW0ZHY5GVEOKB963/index.html',
        });
    }

    var tag = document.createElement('script');
    tag.src = "//static.landbot.io/landbot-widget/landbot-widget-1.0.0.js";
    tag.onload = onLandBotWidgetLoaded;
    var firstScriptTag = document.getElementsByTagName('script')u0];
    firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
});


Hi Chirag,
That worked! Thank you so much!!
All the best!


Hey all,
I have the same challenge as Percy above. The code that ChiragK sent unfortunately does not work in the version with Javascript 3.0. Are there people who can help me with this?

This is the current script: 
">https://cdn.landbot.io/landbot-3/landbot-3.0.0.js">




I'd love to hear if anyone has a solution! 
Thanks a lot.


Hi, could you please show me your survey. What is the chatboot look like? Is it a pop-up chatbot or else?


Leave a Reply