Forum Academy Marketplace Showcase Pricing Features

Need help pasting javascript for integration with Chatwoot live chat

Hi All, I am using the Html (Visual elements) to insert a java script for a integration with Chatwoot. The following javascript was working fine when i preview my app.

<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: 'QzYHegsFMvUfLh4EFyPhsHve',
        baseUrl: BASE_URL
      })
    }
  })(document,"script");
</script>

But I wanted to customise the look of the widget, and their documentation told me to insert the following javascript into the above

window.chatwootSettings = { type: ‘expanded_bubble’, launcherTitle: ‘Chat with us’ }

But it didn’t work.

Can advice?