How to add a delay to the gupshup chat so that the chatbot opens after 5 seconds?

陌路散爱 提交于 2021-01-28 08:31:10

问题


I've made a chatbot and deployed it locally on a wordpress website now i want to add a delay so that chatbot auto opens after 5 second the website is loaded, Using javascript.


回答1:


Ok I myself found the answer to this

<script id="gs-sdk" src='//www.buildquickbots.com/botwidget/v2/demo/static/js/sdk.js?v=2' key="5bxxxx1a-xxx2-xxxa-axx2-1xxxxxxxxa" onload="setTimeout(function(){tc.funcs.toggleWidget(true);}, 5000);"></script>


来源:https://stackoverflow.com/questions/54955944/how-to-add-a-delay-to-the-gupshup-chat-so-that-the-chatbot-opens-after-5-seconds

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!