Injecting HTML script in a website

I have this script of crisp chat which i want to integrate in my website. How can i do the same?

<script>        
window.$crisp=[];
        window.CRISP_WEBSITE_ID="1c7370cc-6ff1-446f-89fa-9769ac56b756";
        (function(){
          d=document;
          s=d.createElement("script");
          s.src="https://client.crisp.chat/l.js";
          s.async=1;
          d.getElementsByTagName("head")[0].appendChild(s);
        })();
</script>
1 Like

Hey Ashish

You can insert the above script by creating an Insert script rule. Following are the steps to do the same:

  • Create a new insert script rule
  • Give it a suitable name and description
  • Specify the rule condition when the rule will be applied. Here you can enter the name of the website on which you wish to integrate this script
  • Insert your integration script in the code body
    Please make a note that you include only the javascript code excluding the script tags i.e. <script> and </script> from the integration script.

You can also refer the attached image.

2 Likes