Search through more than a hundred articles on every aspect of

Andrzej Bieda
Written by Andrzej Bieda

How to customize the widget visibility on certain pages

Sometimes you need to define on which pages of your website you want to show or / and hide the chat widget.

Default settings

We strongly recommend using the settings already built in the application. Go to Settings » Chat Widget Settings and then Widget visibility tab. Read more about setting the options here.

Custom implementation

However, if you want to change the settings on a single page, copy and paste the code below in that page’s folder. (Do not forget to replace YourAPIkey and your_own_domain with your application key and your app domain name!)

You can also use it as 'Custom HTML Tag' in your Google Tag Manager if you use the trigger "Page visit" and specify which pages to act as a trigger.

<script data-cfasync="false"> 
   var config = { 
      apiKey: YourAPIkey, 
      state: "hidden", 
   window.civchat = config 
<script data-cfasync="false" src="https://<your_own_domain>"></script>

You can also set the widget visibility for a single person or for whole segments. You can find more info on this subject here: How to make chat visible only for specific users?

Related articles