Shopify themes, liquid, logos, and UX
Hi there,
I have been using the "Shopify Inbox" live chat widget, but recently figured out it is slowing my site down because it is the first thing to load on the website. Is there a way to change the shopify chat widget so that it loads after x amount of time or after the entire page is done loading?
(website: vaultfurniture.com --> I temporarily disabled the chat widget until I get the popup delayed)
I get how frustrating it is when something helpful like live chat slows down your website. Shopify Inbox widget supposed to load perfectly, which can have effect performance, good news is, you can delay it so it loads *after* your page or a few seconds in.
it do require a bit of custom code, but nothing too hard.
Hello @vaultfurniture
The Shopify Inbox snippet loads synchronously by default in your theme’s <head>, so it kicks off before everything else and delays your page. To defer it, you’ll move the snippet out of the head and wrap it in a small loader that fires after the page (or a timer) completes. Here’s what to do next:
1. Remove the default Inbox snippet
2. Add a deferred loader
<script>
function loadShopifyInbox() {
var s = document.createElement('script');
s.src='https://cdn.shopify.com/shopifycloud/shopify_inbox.js';
s.async = true;
document.body.appendChild(s);
}
// Option A: after full page load
window.addEventListener('load', loadShopifyInbox);
// Option B: after a 3-second delay instead
// setTimeout(loadShopifyInbox, 3000);
</script>
3. Publish and verify
If you're comfortable working with code, I recommend watching this tutorial—it explains how to delay the loading of the Shopify Inbox chat widget until after the user interacts with the page:
https://www.youtube.com/watch?v=mwx1kp8gUSs&t=360s
Note: Before making any changes, be sure to duplicate your theme as a backup.
Hello @vaultfurniture , Based on your question about delaying the Shopify chat widget to load after a specific time or once the entire page has loaded.
Here are the steps you can follow to delay the Shopify chat widget:
1. Lazy-Load the Widget
Use JavaScript to load the chat widget only when the user interacts with the page. Add this to your theme’s JavaScript file
window.addEventListener('scroll', function loadChatWidget() {
if (!document.getElementById('chat-widget-script')) {
const script = document.createElement('script');
script.id = 'chat-widget-script';
script.src='https://chat-widget-url.js';
document.body.appendChild(script);
}
window.removeEventListener('scroll', loadChatWidget);
}, { once: true });
2. Delay Shopify Chat Widget
Add to theme.liquid before </body> tag
<script>
window.addEventListener('load', function () {
setTimeout(function () {
const script = document.createElement('script');
script.src="https://cdn.shopify.com/shopifycloud/shopify_chat/loader.js?shop=your-store.myshopify.com";
script.async = true;
document.body.appendChild(script);
}, 4000); // Delays widget load by 5 seconds
});
</script>
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025