chore: Add Chatwoot SDK to Chatwoot Dashboard (#1726)
Add Chatwoot SDK to Chatwoot Dashboard
This commit is contained in:
@@ -51,5 +51,27 @@
|
||||
<div id="app"></div>
|
||||
<noscript id="noscript">This app works best with JavaScript enabled.</noscript>
|
||||
<%= yield %>
|
||||
<% @global_config['CHATWOOT_INBOX_TOKEN'] %>
|
||||
<% if @global_config['CHATWOOT_INBOX_TOKEN'] %>
|
||||
<script>
|
||||
window.chatwootSettings = {
|
||||
hideMessageBubble: true,
|
||||
position: 'left',
|
||||
};
|
||||
(function(d,t) {
|
||||
var BASE_URL="";
|
||||
var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
||||
g.src=BASE_URL+"/packs/js/sdk.js";
|
||||
s.parentNode.insertBefore(g,s);
|
||||
s.async=!0;
|
||||
g.onload=function(){
|
||||
window.chatwootSDK.run({
|
||||
websiteToken: '<%= @global_config['CHATWOOT_INBOX_TOKEN'] %>',
|
||||
baseUrl: BASE_URL,
|
||||
});
|
||||
}
|
||||
})(document,"script");
|
||||
</script>
|
||||
<% end %>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user