This guide shows you how to add Heyo to your Bubble application without writing any code.
Paste this code into the HTML element:
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>
Replace YOUR_PROJECT_ID with your actual Project ID from the Heyo dashboard.
To show the chat on all pages:
This will hide the chat widget when users are not logged in.
Create an HTML element with dynamic content:
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>
<script>
window.addEventListener('load', function() {
if (window.HEYO && <Current User is logged in>) {
window.HEYO.init({
projectId: 'YOUR_PROJECT_ID',
user: {
name: '<Current User's name>',
email: '<Current User's email>',
id: '<Current User's unique id>'
}
});
}
});
</script>
To insert dynamic data:
If you store user data in custom states:
Create page-specific HTML elements instead of using a reusable element. Add the Heyo code only to pages where you want chat to appear.
data-project-idExample setup:
Hide the default Heyo button and create your own:
HTML Element for Heyo (hidden):
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>
<style>
#heyo-widget-button {
display: none !important;
}
</style>
Custom Button in Bubble:
window.HEYO?.show();Note: This requires the "Toolbox" plugin or similar JavaScript runner plugin.
Send context about what users are viewing:
<script>
window.addEventListener('load', function() {
if (window.HEYO) {
window.HEYO.trackEvent('viewing_page', {
page: '<Current Page name>',
url: window.location.href
});
}
});
</script>
Heyo is automatically responsive. However, if you want to adjust positioning for mobile:
Add this CSS in an HTML element:
<style>
@media (max-width: 768px) {
#heyo-widget-button {
bottom: 80px !important; /* Adjust as needed */
}
}
</style>
Heyo works alongside other Bubble plugins without conflicts. It's compatible with: