Shopify Installation Guide

Follow these simple steps to add the LiveChat widget to your Shopify store. The chat button will appear on all pages of your store.

📝 Other Guides: General | WordPress | WooCommerce | All Guides
📋 Before You Begin:
  • Log in to your Shopify admin panel
  • Log in to your LiveChat Dashboard and get your Account ID
  • If you switch themes later, you'll need to add the code again
  • Replace YOUR_COMPANY_ID in the code below with your actual Account ID
  • Official Domain: Use https://poplivechat.com for production deployment

Step 1: Access Shopify Theme Editor

In your Shopify admin panel, go to:

Online StoreThemes → Click "Actions""Edit code"

Step 2: Open theme.liquid File

In the theme editor, find and open the "theme.liquid" file (usually located in the "Layout" folder).

This file controls the layout for all pages in your store.

Step 3: Find the Closing </body> Tag

Scroll down in the theme.liquid file and find the closing </body> tag near the end of the file.

The code should be placed just before this tag.

Step 4: Copy and Paste the Code

Copy the code below and paste it just before the </body> tag:

<!-- LiveChat Chat Widget - Shopify Integration -->
<script>
    // Defer loading of LiveChat widget until page is fully loaded
    (function() {
        function loadLiveChatWidget() {
            // Load CSS dynamically
            var cssLink = document.createElement('link');
            cssLink.rel = 'stylesheet';
            cssLink.href = 'https://poplivechat.com/css/chat-widget.css';
            cssLink.media = 'all';
            document.head.appendChild(cssLink);
            
            // Load JS dynamically
            var jsScript = document.createElement('script');
            jsScript.src = 'https://poplivechat.com/js/chat-widget.js';
            jsScript.async = true;
            jsScript.onload = function() {
                // Initialize chat widget after script loads
                window.LiveChatWidget.init({
                    companyId: 'YOUR_COMPANY_ID',
                    buttonText: '💬 Chat Now',
                    buttonPosition: 'bottom-right',
                    primaryColor: '#667eea'
                });
            };
            document.body.appendChild(jsScript);
        }
        
        // Wait for full page load before loading chat widget
        if (window.addEventListener) {
            window.addEventListener('load', loadLiveChatWidget, false);
        } else if (window.attachEvent) {
            window.attachEvent('onload', loadLiveChatWidget);
        } else {
            window.onload = loadLiveChatWidget;
        }
    })();
</script>

⚠️ Important: Replace YOUR_COMPANY_ID with your actual Account ID (e.g., XU22). The official domain is poplivechat.com.

Note: The code is already configured with your Account ID and will load after page content.

Step 5: Save and Test

Click the "Save" button at the bottom of the editor.

Visit your Shopify store and look for the chat button in the bottom-right corner. Click it to test!

✅ What You'll See:
  • A floating chat button appears on all pages of your Shopify store
  • Visitors can click the button to start a conversation
  • The widget loads automatically after page content
💡 Important Tips:
  • If you switch Shopify themes, you'll need to add the code to the new theme's theme.liquid file
  • The chat widget will appear on all pages: homepage, product pages, cart, checkout, etc.
  • Make sure you paste the code before the </body> tag, not after it

Troubleshooting

Chat widget not appearing?

  • Check that the code is placed before the </body> tag in theme.liquid
  • Verify your Account ID is correct in the code
  • Try clearing your browser cache
  • Check browser console (F12) for JavaScript errors

Need Help?

If you encounter any issues during installation, please contact our support team:

📧 Email: contact@items7.com
🏠 Access Dashboard | All Installation Guides