Are you using Next.js / React to create your new web application? Here is how you can add the Crisp chatbox on it in less than 2 minutes.

Create an account on Crisp.
Go to Settings. Then, Website Settings.
Next to your website, click on Settings.
Click on Setup instructions.
Click on Chatbox setup instructions.
Select HTML.

Copy the JavaScript code to retrieve your CRISP_WEBSITE_ID.

Inside your components folder, create a file crisp.js and paste this code below. Replace the CRISP_WEBSITE_ID with yours.

class Crisp extends React.Component {
componentDidMount () {
// Include the Crisp code here, without the <script></script> tags
window.$crisp = [];

(function() {
var d = document;
var s = d.createElement("script");

s.src = "";
s.async = 1;

render () {
return null;
export default Crisp

Make sure to replace CRISP_WEBSITE_ID with yours. Otherwise, this will not work!

Then, we tell can import Crisp in our component.

import dynamic from 'next/dynamic'

const CrispWithNoSSR = dynamic(
() => import('../components/crisp'),
{ ssr: false }

and Finally include it in your App:

class App extends React.Component {
render () {
return (
<CrispWithNoSSR />
export default App

If you are using the Hook Effect introduced in React 16.8, you can add Crisp using the following code:
useEffect(() => {
window.$crisp = [];
(() => {
const d = document;
const s = d.createElement("script");
s.src = "";
s.async = 1;

If you refresh the page, you should now see your brand new Crisp livechat appearing on your website.*
Was this article helpful?
Thank you!