This guide shows you how to add Heyo to your Webflow website. Perfect for designers, agencies, and client projects.
In the Head Code section, add:
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>
Click Save Settings and Publish your site. The chat widget will now appear!
Create a custom-designed button in Webflow to open the chat:
chat-trigger)<script>
document.addEventListener('DOMContentLoaded', function() {
const chatButton = document.querySelector('.chat-trigger');
if (chatButton) {
chatButton.addEventListener('click', function(e) {
e.preventDefault();
window.HEYO?.show();
});
}
});
</script>
If you're using a custom button, hide the default Heyo button:
<style>
#heyo-widget-button {
display: none !important;
}
</style>
Use Webflow's page-specific embed feature:
Or use conditional display with JavaScript:
<script>
window.addEventListener('load', function() {
// Hide on checkout page
if (window.location.pathname.includes('/checkout')) {
const heyoWidget = document.querySelector('#heyo-widget-button');
if (heyoWidget) {
heyoWidget.style.display = 'none';
}
}
});
</script>
Capture Webflow form submissions and pass context to chat:
<script>
// Add to Footer Code
document.addEventListener('DOMContentLoaded', function() {
const form = document.querySelector('[data-name="Contact Form"]');
if (form) {
form.addEventListener('submit', function(e) {
const email = form.querySelector('[name="email"]').value;
const name = form.querySelector('[name="name"]').value;
if (window.HEYO) {
window.HEYO.init({
projectId: 'YOUR_PROJECT_ID',
user: {
name: name,
email: email
}
});
}
});
}
});
</script>
Heyo automatically works on all Webflow CMS pages. To pass CMS data:
<!-- Add to CMS Template Page Settings -->
<script>
window.addEventListener('load', function() {
if (window.HEYO) {
window.HEYO.trackEvent('viewing_content', {
title: document.title,
url: window.location.href
});
}
});
</script>
For Webflow e-commerce sites, help customers during checkout:
<script>
window.addEventListener('load', function() {
// Track product views
const productName = document.querySelector('.product-name')?.textContent;
if (productName && window.HEYO) {
window.HEYO.trackEvent('viewing_product', {
product: productName
});
}
});
</script>
Customize the widget colors in your Heyo dashboard:
Control widget visibility on mobile:
<style>
@media (max-width: 768px) {
#heyo-widget-button {
bottom: 80px; /* Adjust if needed */
}
}
</style>
For agencies managing multiple client sites:
With Heyo Pro, remove branding for a professional client deliverable.
<style>
#heyo-widget-button {
z-index: 9999 !important;
}
</style>