Hello,
I’m currently working on integrating a chatbot into my Next.js application (version 14.2.14). However, I’m encountering an error in the console, and the chatbot is not showing up on the page.
I have included the relevant code in the JavaScript file, but I am unsure what is causing the issue. Could you please assist me in troubleshooting or provide suggestions for resolving this problem?
Any help would be greatly appreciated!
Thank you.
Receiving Error in Console
JS Code
window.ymConfig = { “bot”: “x1734168923745”, “host”: “https://r0.cloud.yellow.ai” };
(function() {
var w = window,
ic = w.YellowMessenger;
if (“function” === typeof ic) {
ic(“reattach_activator”);
ic(“update”, ymConfig);
} else {
var d = document,
i = function() {
i.c(arguments);
};
function l() {
var e = d.createElement(“script”);
e.type = “text/javascript”;
e.async = !0;
e.src = “https://cdn.yellowmessenger.com/plugin/widget-v2/latest/dist/main.min.js”;
var t = d.getElementsByTagName(“script”)[0];
t.parentNode.insertBefore(e, t);
}
i.q = ;
i.c = function(e) {
i.q.push(e);
};
w.YellowMessenger = i;
l();
}
})();