Integrate OneChat with Gatsby
Gatsby
OneChat has an official Gatsby plugin for integrating the widget on your websites
Add gatsby-plugin-OneChat to your gatsby project.
npm install --save gatsby-plugin-OneChat
if you are using yarn, use
yarn add gatsby-plugin-OneChat
Add the plguin to your gatsby config file
// In your gatsby-config.js
plugins: [
{
resolve: `gatsby-plugin-OneChat`,
options: {
baseUrl: "BASE_URL", // Required
websiteToken: "WEBSITE_TOKEN", // Required
includeInDevelopment: false, // Optional
OneChatSettings: {}, // Optional
},
},
];
You can get your website token and base url from your inbox settings, or you can create a new inbox from the OneChat dashboard follwoing this link
Start your sever and You would be able to see the OneChat widget on the page now.
Updated on: 23/03/2023
Thank you!