Gorgias logo
Gorgias logo

All articles

Disable auto open ChatUpdated 8 months ago

This suggestion isn't an official feature of our Chat widget, so our support for it is limited - we recommend that it be implemented by someone with a technical background.


The Chat window will automatically open for returning customers if they leave the Chat window open and their last visit was less than 4 days ago (except on mobile). 

You can prevent this using the following method:

1<script>
2 window.GORGIASCHAT_DISABLE_AUTO_OPEN = true
3</script>
Unlike the rest of the Gorgias Chat API scripts, the one above should be implemented without the gorgiaschat.init wrapper below due to the difference in logic on our back end.


Here's what the wrapper looks like, for reference - it should be excluded from the above script:

1<script>
2GorgiasChat.init().then(function() {
3
4})
5</script>
6
Was this article helpful?
Yes
No