I am trying to test Zoho live chat widget code in react js
, below is the sample code
window.$zoho = window.$zoho || {};window.$zoho.salesiq = window.$zoho.salesiq || {widgetcode:"XXXXXXXXXX", values:{},ready:function(){}}; let d= document; let s = d.createElement("script"); s.type ="text/javascript"; s.id ="zsiqscript"; s.defer = true; s.src = "https://salesiq.zoho.eu/widget"; let t = d.getElementsByTagName("script")[0]; t.parentNode.insertBefore(s,t); d.write(""); window.$zoho.salesiq.ready = function() { window.$zoho.salesiq.floatwindow.visible("show"); }
Above is the code written and with on click of Live chat, a link should display the live chat widget. Now I am not getting any errors or not displaying the Zoho button. Please help if it is the correct way to test in react js. unionwell spain