How to Add the Thinkstack Chatbot to Your Shopify Store
info
This guide walks you through the steps to integrate the Thinkstack chatbot into your Shopify store.
#
Copy the Chat Bubble Script from Thinkstack DashboardLog in to your Thinkstack account. Navigate to the Embed page in the Thinkstack dashboard. Copy the chat bubble script provided.
#
Add the Thinkstack Embed Script to Your Shopify ThemeLog in to your Shopify Admin Dashboard: Go to Shopify Admin page.
Access the Theme Code: In the left navigation menu, click Online Store > Themes. Under your current theme, click on the 3-dots. Select Edit code.
Paste the Thinkstack Script: In the file explorer, locate the
theme.liquid
file. This file controls your site's global layout.Paste the Thinkstack embed script you copied earlier just above the closing
</body>
tag.
note
Add Defer Attribute: To optimize the loading of the script, add the attribute defer="defer"
to the Thinkstack script.
#
Add Chat Toggler for Direct EmbeddingTo ensure the chatbot is easily accessible and visible, add the following script below the Thinkstack embed script:
<script> let thinkstackCounter = 0; function initializeChatToggler() { let e = document.getElementById("thinkstack-chat-window-toggler"); if (e) { let t = document.createElement("button"); t.style.cssText = `background-color: #fff; position: fixed; bottom: 1rem; right: 1rem; height: 50px; width: 50px; border-radius: 50%; z-index: 999; background-image: url('${e.getAttribute("data-main-icon")}'); background-repeat: no-repeat; background-position: center; background-size: cover; cursor: pointer; transition: all 300ms ease; outline: none; border: none;`; t.addEventListener("click", () => { e.click(); }); document.body.appendChild(t); } else { if (++thinkstackCounter > 120) return; setTimeout(initializeChatToggler, 500); } } initializeChatToggler();</script>
This script creates a custom floating chat button that users can click to open the chatbot.
#
Save and Verify- Click "Save" in the Shopify code editor. Go to your Shopify store homepage.
- Refresh the page to verify the chatbot appears and functions correctly.
#
Test Your ChatbotEnsure the chatbot opens when the chat icon is clicked. Test a few questions to confirm the chatbot responds as expected.
That's a wrap 🎉, you have added the Thinkstack chatbot to your Shopify store. You can now interact with your visitors and provide real-time support.