Jump to content

cannot figure out where to put purechat code


sean1688

Recommended Posts

purechat is a live chat service, and they provide a very small javascript to install on the website to enable live chat with visitors.

 

their instructions said to: Copy and paste this code just before the closing </body> tag on every page you'd like it to appear.

 

I did a little search on this forum and placed the code in the main.php, but it completely broke the code and the website fail to launch.

 

can someone help?

 

this is the beginning part of the code, I removed part of the code to hide account information.

 

<script type='text/javascript'>(function () { var done = false;var script = document.createElement('script');script.async = true;script.type = 'text/javascript';script.src = 'https://app.purechat.com/VisitorWidget/WidgetScript;document.getElementsByTagName(HEAD').item(0).appendChild(script);script.onreadystatechange= script.onload = function (e) {if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...