Install the live chat widget on Gatsby
XACUBE puts a live chat widget on your Gatsby site, so your live agents can answer visitors the moment they ask, from one shared inbox. The free plan covers one agent.
- Add this to
gatsby-ssr.jsin your project’s root. - Publish your site. The chat appears on every page.
import React from 'react'
export const onRenderBody = ({ setPostBodyComponents }) => {
setPostBodyComponents([
<script key="xacube" src="https://chat.xacube.chat/w.js" data-key="YOUR_PUBLIC_KEY" async />
])
}Replace YOUR_PUBLIC_KEY with your own key. In your panel, open your website and this code is shown with your key already in it.