How to install Customerly Live Chat with Javascript

Our script works out of the box with the majority of websites. If you have a WordPress website you can check our guide on how to install Customerly Live Chat on Wordpress.


Let's proceed with the Javascript integration.


First of all, you need your Project ID or App ID.


Once you have an App ID proceed to copy and paste the following code into your <head></head> tag on your website.

This code will load the widget without any user authentication. If you search to integrate Customerly with your user session data read below.

<!-- Customerly Live Chat Snippet Code --> 
<script>     
!function(){var e=window,i=document,t="customerly",n="queue",o="load",r="settings",u=e[t]=e[t]||[];if(u.t){return void u.i("[customerly] SDK already initialized. Snippet included twice.")}u.t=!0;u.loaded=!1;u.o=["event","attribute","update","show","hide","open","close"];u[n]=[];u.i=function(t){e.console&&!u.debug&&console.error&&console.error(t)};u.u=function(e){return function(){var t=Array.prototype.slice.call(arguments);return t.unshift(e),u[n].push(t),u}};u[o]=function(t){u[r]=t||{};if(u.loaded){return void u.i("[customerly] SDK already loaded. Use customerly.update to change settings.")}u.loaded=!0;var e=i.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://messenger.customerly.io/launcher.js";var n=i.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};u.o.forEach(function(t){u[t]=u.u(t)})}();         
  
customerly.load({           
     "app_id": "PROJECT_ID"     
  }); 

</script> 
<!-- End of Customerly Live Chat Snippet Code -->