Trouble with js script pro header

I wish to use this code in order to put my chat triggered by button from my pro header . The problem is that i could not make it work , i have had some http 500 errors and so . I am trying to put the js script into my header.php of my pro x theme and the url of the chat but unfortunately i was not able to do it . Could be possible to give me an advice or help me in order to do it properly please .

Hi,

You can add this in Theme Options > JS

window.tidioChatApi.on("ready", function() {
  window.tidioChatApi.hide();
  window.tidioChatApi.on("close", function() {
    window.tidioChatApi.hide();
  });
});

$(".chat-button").click(function() {
  window.tidioChatApi.show();
  window.tidioChatApi.open();
});

Then add this code in a raw content element where you want the button to appear

<button class="chat-button">Open chat</button>
<script src="//code.tidio.co/w0i4b7fdeerfqqn4w8lwb7ahjasjnrmd.js">
</script>

Please note that this is outside the scope of support and the steps provided is just to give something to start with.

Thanks for understanding. Take care!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.