Shopify Installation
Install the nuhello chatbot on your Shopify store.
Step 1: Access Theme Editor
- Log in to your Shopify admin dashboard
- Go to Online Store → Themes
- Find your current theme and click Actions → Edit code
Step 2: Edit theme.liquid
- In the left sidebar, under Layout, click on
theme.liquid - Find the closing
</head>tag - Paste the nuhello script just before
</head>:
<script>
window.nuhelloSettings = {
key: "YOUR_PIXEL_KEY",
botId: "YOUR_BOT_ID"
};
(function() {
var s = document.createElement('script');
s.src = 'https://cdn.nuhello.com/widget.js';
s.async = true;
document.head.appendChild(s);
})();
</script>
</head>- Click Save
Identifying Customers
To pass logged-in customer data to nuhello, use Shopify's Liquid variables:
<script>
window.nuhelloSettings = {
key: "YOUR_PIXEL_KEY",
botId: "YOUR_BOT_ID"
{% if customer %}
,userId: "{{ customer.id }}",
name: "{{ customer.name }}",
email: "{{ customer.email }}"
{% endif %}
};
(function() {
var s = document.createElement('script');
s.src = 'https://cdn.nuhello.com/widget.js';
s.async = true;
document.head.appendChild(s);
})();
</script>Using Shopify App Embed (Alternative)
If you prefer not to edit code, you can use the Shopify App Embed feature:
- Go to Online Store → Themes
- Click Customize on your current theme
- Click App embeds in the left sidebar
- Enable the nuhello app (if available)
Adding a Chat Button
To add a custom button that opens the chat:
- Open the page or section where you want the button
- Add a custom HTML block or edit a Liquid file
- Add this code:
<button onclick="window.openNuhelloWidget()" class="chat-button">
Chat with us
</button>
<style>
.chat-button {
background-color: #007bff;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
.chat-button:hover {
background-color: #0056b3;
}
</style>Show Widget on Specific Pages Only
To show the widget only on certain pages:
<script>
window.nuhelloSettings = {
key: "YOUR_PIXEL_KEY",
botId: "YOUR_BOT_ID"
};
{% if template contains 'product' or template contains 'collection' %}
(function() {
var s = document.createElement('script');
s.src = 'https://cdn.nuhello.com/widget.js';
s.async = true;
document.head.appendChild(s);
})();
{% endif %}
</script>Pass Order Data
For post-purchase support, pass order data:
{% if checkout %}
<script>
window.nuhelloSettings = {
key: "YOUR_PIXEL_KEY",
botId: "YOUR_BOT_ID",
orderId: "{{ checkout.order_id }}",
orderTotal: "{{ checkout.total_price | money }}",
email: "{{ checkout.email }}"
};
(function() {
var s = document.createElement('script');
s.src = 'https://cdn.nuhello.com/widget.js';
s.async = true;
document.head.appendChild(s);
})();
</script>
{% endif %}Troubleshooting
Widget not appearing?
- Clear your browser cache
- Try viewing your store in incognito mode
- Check if the script appears in the page source (View Page Source)
- Verify your pixel key and bot ID
Conflicts with other apps?
Some Shopify apps may conflict with external scripts. Try:
- Disabling other chat apps temporarily
- Moving the script to the bottom of
theme.liquid, just before</body>
Preview vs Live Store
The widget may not appear in the theme editor preview. Test on your actual store URL.