Docs

Shopify Integration Guide

Add Heyo live chat to your Shopify store to increase conversions and reduce cart abandonment.

This guide shows you how to add Heyo to your Shopify store. Works with all Shopify plans including Shopify Plus.

Installation

Step 1: Access Theme Code

  1. From your Shopify admin, go to Online Store > Themes
  2. Find your active theme and click Actions > Edit code
  3. In the left sidebar, locate and click on theme.liquid under Layout

Step 2: Add Heyo Script

Add this code before the closing </head> tag:

<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>

Step 3: Save

Click Save in the top right corner. The chat widget will now appear on your store!

Advanced Integration

Pass Customer Data

Show customer information in your support inbox:

<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>

{% if customer %}
<script>
window.addEventListener('load', function() {
  if (window.HEYO) {
    window.HEYO.init({
      projectId: 'YOUR_PROJECT_ID',
      user: {
        name: '{{ customer.name | escape }}',
        email: '{{ customer.email | escape }}',
        customerId: '{{ customer.id }}'
      }
    });
  }
});
</script>
{% endif %}

Show Chat on Specific Pages Only

Only on Product Pages

{% if template contains 'product' %}
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>
{% endif %}

Only on Cart and Checkout

{% if template contains 'cart' or checkout %}
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>
{% endif %}

Hide on Checkout Pages

{% unless checkout %}
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>
{% endunless %}

Track Product Views

Send context about what products customers are viewing:

<!-- Add to product pages -->
{% if template contains 'product' %}
<script>
window.addEventListener('load', function() {
  if (window.HEYO) {
    window.HEYO.trackEvent('viewing_product', {
      product: '{{ product.title | escape }}',
      price: '{{ product.price | money }}',
      url: '{{ product.url }}'
    });
  }
});
</script>
{% endif %}

Custom Trigger Button

Add a "Chat with us" button to your product pages:

<button 
  onclick="window.HEYO?.show()" 
  class="btn btn-primary"
  style="margin: 20px 0;">
  Questions? Chat with us!
</button>

Use Cases for Shopify

Cart Abandonment Recovery

Message customers who are hesitating at checkout:

  1. Set up visitor alerts in Heyo dashboard
  2. Trigger when users spend more than 2 minutes on cart page
  3. Reach out proactively: "Need help with your order?"

Product Recommendations

Help customers find the right product:

  1. Monitor visitor activity
  2. See what products they're viewing
  3. Offer assistance and recommendations

Post-Purchase Support

Help with order tracking and questions:

{% if template contains 'thank-you' %}
<script>
window.addEventListener('load', function() {
  if (window.HEYO) {
    window.HEYO.init({
      projectId: 'YOUR_PROJECT_ID',
      user: {
        name: '{{ customer.name | escape }}',
        email: '{{ customer.email | escape }}',
        orderNumber: '{{ order.name }}'
      }
    });
  }
});
</script>
{% endif %}

Customization

Match Your Brand Colors

Customize the widget to match your store's theme:

  1. Go to your Heyo dashboard
  2. Navigate to Project Settings > Appearance
  3. Set colors to match your Shopify theme

Position

Control where the chat button appears:

<script>
window.addEventListener('load', function() {
  if (window.HEYO) {
    window.HEYO.config({
      position: 'bottom-right', // or 'bottom-left'
    });
  }
});
</script>

Shopify Plus Features

Checkout Page Integration

For Shopify Plus merchants with access to checkout.liquid:

<!-- In checkout.liquid -->
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>

Multi-Language Stores

Auto-detect customer language:

<script>
window.addEventListener('load', function() {
  if (window.HEYO) {
    window.HEYO.config({
      language: '{{ request.locale.iso_code }}'
    });
  }
});
</script>

Performance Considerations

Won't Slow Down Your Store

  • Heyo loads asynchronously with the defer attribute
  • Minimal impact on page load time
  • Won't affect checkout performance
  • Optimized for mobile shoppers

Works with Page Speed Apps

Compatible with:

  • Lazy loading images
  • Script optimization apps
  • Minification tools
  • CDN services

Troubleshooting

Widget not showing

  • Verify your Project ID is correct
  • Check that you saved theme.liquid
  • Clear your browser cache and refresh
  • Check browser console for errors

Showing on the wrong pages

  • Review your Liquid conditional tags
  • Make sure you're using the correct template checks
  • Test in incognito mode

Conflicts with other chat apps

  • Disable other chat apps to avoid conflicts
  • Only one chat widget should be active at a time

Not working after theme update

  • Theme updates can overwrite your changes
  • Re-add the Heyo script after updating your theme
  • Consider creating a backup snippet for easy re-installation

Best Practices

  1. Add customer context - Pass customer data for personalized support
  2. Position strategically - Consider bottom-right for most stores
  3. Match your brand - Customize colors to match your theme
  4. Test on mobile - Most Shopify traffic is mobile
  5. Train your team - Make sure your team knows how to use Heyo
  6. Set up alerts - Use visitor alerts for cart abandonment
  7. Quick replies - Create templates for common questions

Next Steps