If you are concerned about the privacy of your users, and want the chatbox session cookie to expire sooner than default (6 months), you can easily alter this expire time from your JavaScript code.

You can do so using the Crisp Cookie Expire chatbox variable. The expire time is set in seconds. The cookie expiration time is prolonged every time a visitor with an existing cookie access your website.

How To Change Chatbox Cookie Expire Date?

Chatbox cookie default expire date can be adjusted, using the CRISP_COOKIE_EXPIRE variable.

You can use the following Crisp chatbox code (fill CRISP_COOKIE_EXPIRE with your adjusted expire time in seconds):

<script type="text/javascript">
$crisp = [];
CRISP_COOKIE_EXPIRE = 3600; // Expire time in seconds, here: 1 hour = 3600 seconds

Make sure to enter an expiration time in seconds. For instance, to expire the cookie after 1 hour, you'd enter 3600.

You need to ensure the altered cookie expire time variable is set on every page that has the chatbox included on. If a visitor accesses a page where you're not setting this variable, their cookie expiration time will be updated to the default again (6 months) when the chatbox will launch.
Was this article helpful?
Thank you!