Open livechat programmatically #4760
Answered
by
pranavrajs
softmarshmallow
asked this question in
Q&A
-
We can add chat button via below script, but what I want is to have my own support button that has "Chat with us" menu in it. <script>
(function(d,t) {
var BASE_URL="https://app.chatwoot.com";
var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=BASE_URL+"/packs/js/sdk.js";
g.defer = true;
g.async = true;
s.parentNode.insertBefore(g,s);
g.onload=function(){
window.chatwootSDK.run({
websiteToken: 'xxxxxxxx',
baseUrl: BASE_URL
})
}
})(document,"script");
</script> |
Beta Was this translation helpful? Give feedback.
Answered by
pranavrajs
May 30, 2022
Replies: 2 comments 3 replies
-
Please see this guide. https://www.chatwoot.com/docs/product/channels/live-chat/sdk/setup#trigger-widget-without-displaying-bubble |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
softmarshmallow
-
For future reference. Implemented on react / nextjs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please see this guide. https://www.chatwoot.com/docs/product/channels/live-chat/sdk/setup#trigger-widget-without-displaying-bubble