A
A
andreyveselov12021-07-02 20:29:11
JavaScript
andreyveselov1, 2021-07-02 20:29:11

How to hide the live chat template button from Crisp?

The site has live chat from Crisp. You need to replace the standard button with your own to open the chat window. In support, they suggested that you can hide the standard button and install your own. Here is what I have:

1. In head is the live chat script itself:

window.$crisp=[];window.CRISP_WEBSITE_ID="5b17113e-7ced-4511-aaaa-1baf4112a907";(function(){ d=document;s=d.createElement("script"); s.src="https://client.crisp.chat/l.js"; s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();


2. In the body of your button:
<button onclick="$crisp.push(['do', 'chat:open'])">Click Me!</button>


3. Here is what support gave me:
Description: Hides the chatbox (don't close it if open, sets it invisible).
Code: $crisp.push(["do", "chat:hide"])

Question: how to correctly insert the specified code in step 3 to display only the button from step 2 on the site?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
profesor08, 2021-07-02
@profesor08

Paste in head after the script

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question