How to hide Assistant on specific pages

Perhaps you're using one GoSquared Analytics code for your marketing site, blog and app and you only want to have Assistant enabled in your app. This can now be done by adding one extra line to your code snippet on the pages where you want to disable Assistant.
 

Disable Assistant on a specific page

On your site, find the page that you want to disable Assistant on. Then, just add this one extra line of code below the GoSquared code snippet:
 

_gs('set', 'chat', false)


In context, the extra line of code should be just below the regular GoSquared snippet like this:
 

<script>  
!function(g,s,q,r,d){r=g[r]=g[r]||function(){(r.q=r.q||[]).push( 
arguments)};d=s.createElement(q);q=s.getElementsByTagName(q)[0]; 
d.src='//d1l6p2sc9645hc.cloudfront.net/tracker.js';
q.parentNode.insertBefore(d,q)}(window,document,'script','_gs'); 
_gs('GSN-XXXXXX-X'); 

_gs('set', 'chat', false);  
</script>


Note: This method will completely disable Assistant on the page. Prompts and broadcast messages will not work on this page. Instead if you are just trying to hide the default Assistant button so that you can use your own button, please see this article instead.

Did you find this article helpful?