Excluding your chat widget on certain pages of your website

Updated 4 months ago by Justin Maxwell


You've installed the Smith.ai Chat widget on your website, but you don't want it to appear on specific pages. For example, certain areas of your website may drive an abnormal amount of bad leads (e.g., high SEO pages for people just seeking information), wasting your time.


Instead of using the JavaScript snippet provided in your chat account, you'll need to modify things a bit. Find your code and paste it into a notepad editor. There are a few things we'll need:

  • Your specific chat ID (we'll show you how to find this)
  • The addresses of the pages you'd like to exclude
  1. Find your Chat ID and keep this handy. We will refer to this as $ChatID.

  2. Find the addresses of the page(s) you want to ignore and paste them into your text document

  3. Then delete everything from "https:// through the first slash for each of them

  4. Ok, so at this point you should have your $ChatID and the paths of any pages you want to exclude. Now, paste this into your document:
  5. Replace $ChatID with your actual Chat ID.
  6. This next part is a bit trickier. You're going to wrap each page in quotes and put a comma after each except for the last one. Like:

    (notice the last one does not have a comma)

    or in our case:

  7. Ok, assuming you did everything, You'll now have a chunk of code like this. BUT NOT THIS, because if you just copy and paste ours, it won't do anything.
  8. Now, replace the javascript widget on your live site with your new shiny context-sensitive javascript!

How did we do?

Powered by HelpDocs