This guide shows you how to add Heyo to your Squarespace website. Works with both Squarespace 7.0 and 7.1.
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>
The chat widget will now appear on all pages.
To add chat to specific pages only:
Help customers with product questions:
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>
<script>
// Show chat only on product pages
if (window.location.pathname.includes('/shop/') || window.location.pathname.includes('/products/')) {
// Chat will load automatically
} else if (window.HEYO) {
// Optionally hide on other pages
// window.HEYO.hide();
}
</script>
Add this to Code Injection (Header):
<style>
body.checkout-page #heyo-widget-button {
display: none !important;
}
</style>
Create a button block in Squarespace, then add this to Code Injection (Footer):
<script>
document.addEventListener('DOMContentLoaded', function() {
// Find buttons with specific URL or text
const chatButtons = document.querySelectorAll('a[href="#chat"], a[href="#heyo"]');
chatButtons.forEach(button => {
button.addEventListener('click', function(e) {
e.preventDefault();
window.HEYO?.show();
});
});
});
</script>
Then set your button's link to #chat or #heyo.
Heyo is automatically responsive. To adjust mobile positioning:
<style>
@media (max-width: 768px) {
#heyo-widget-button {
bottom: 20px !important;
right: 20px !important;
}
}
</style>
For sites with member areas:
<script>
window.addEventListener('load', function() {
// Check if user is logged in (Squarespace adds classes to body)
const isLoggedIn = document.body.classList.contains('squarespace-authenticated');
if (isLoggedIn && window.HEYO) {
// Optionally show chat only to logged-in members
window.HEYO.show();
}
});
</script>
Full code injection support - follow the standard installation above.
Code injection works the same way. Access via:
<style>
#heyo-widget-button {
z-index: 9999 !important;
}
</style>
Heyo works with all Squarespace templates including:
Heyo works alongside Squarespace extensions: