Before installing, you'll need your Project ID from the Heyo dashboard.
You can find it in the dashboard Project Settings
You can install Heyo with via classic HTML script, or using the fully typed JavaScript SDK (recommended if you know how to code)
Add this script tag before the closing </head> tag in your HTML:
<script src="https://heyo.so/embed/script" defer></script>
That's it!
The chat widget will appear on your website, and you can start chatting with your users.
Install the package with your package manager of choice:
npm install @heyo.so/js
pnpm add @heyo.so/js
yarn add @heyo.so/js
bun add @heyo.so/js
Then initialize it in your app (you can use either import style):
// Named import
import { HEYO } from '@heyo.so/js';
// OR default import
import HEYO from '@heyo.so/js';
// Both work the same!
HEYO.init();
And hat's it! The widget will appear on your website and you're ready to chat.
By default, Heyo will try to match your project based on the domain you load the script on. But when developping locally, there is no domain yet, so you need to specify the project ID manually.
But no worries, this is still as easy as the rest!
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>
HEYO.init({ projectId: 'YOUR_PROJECT_ID' });