How to Add Asyntai AI Chatbot to Lightspeed
Step-by-step guide for Lightspeed eCom stores
步骤1:获取您的嵌入代码
首先,前往您的 Asyntai 仪表板并向下滚动到"嵌入代码"部分。复制您的专属嵌入代码,格式如下:
<script>(function(){var l=function(){var s=document.createElement("script");s.src="https://widget.asyntai.com/static/js/chat-widget.js";s.async=true;s.setAttribute("data-asyntai-id","YOUR_WIDGET_ID");document.head.appendChild(s)};if(document.readyState==="complete"){l()}else{window.addEventListener("load",l)}})();</script>
注意: 以上代码仅为示例。您必须从仪表板复制您自己的专属嵌入代码,因为其中包含您的个人小部件 ID。
Step 2: Add the Code via Web Extras (Recommended)
Lightspeed eCom (C-Series) has a built-in Custom JavaScript field that loads on every page of your online store — this is the easiest place to add your Asyntai widget. No theme editing required.
- Log in to your Lightspeed eCom Back Office
- In the left-hand menu, go to Settings
- Under Website settings, click Web Extras
- Select the Custom JavaScript tab
- Paste your Asyntai embed code into the text field
- 点击 Save 应用更改
提示: Code added in the Custom JavaScript field runs on all pages of your store automatically, so the chat widget appears everywhere without touching your theme files.
注意: The Custom JavaScript field expects a full script tag. Paste your embed code exactly as it appears in your Dashboard — including the opening and closing <script> tags.
重要提示: Only add code from trusted sources over a secure (SSL / HTTPS) connection, and make sure all tags and brackets are correctly closed. Malformed scripts can interfere with your store's checkout and layout. The Asyntai embed code is a single, self-contained script that is safe to add here.
Alternative Method: Template Editor
If you prefer to edit your theme directly, or you want the widget on specific pages only, you can add the embed code through the Template Editor instead:
- In the Back Office, go to Design → Customize theme
- Open the Advanced section and choose Edit code to launch the Template Editor
- Open your theme's main layout file (commonly named index.rain or a shared header/footer template)
- Find the closing </body> tag
- 将您的 Asyntai 嵌入代码粘贴到 </body> 标签之前
- Click Save to apply your changes
注意: The Template Editor is only recommended for experienced users. For most stores, the Custom JavaScript field described above is simpler and safer. Consider duplicating your theme before editing template files so you can easily revert.
步骤 4:验证安装
After saving your changes, open your Lightspeed store in a new browser tab or incognito window. You should see the chat widget button in the bottom right corner. Click it to ensure it opens and functions correctly.
看不到小部件? Make sure you've saved all template changes. Clear your browser cache or view in incognito mode. Lightspeed may cache pages, so changes might take a few minutes to appear. Check the browser console (F12) for any JavaScript errors.
需要帮助?
If you're not comfortable editing template files, Lightspeed's Customer Support team can assist with custom code and design requests. You can also contact Asyntai support for guidance on installing the chatbot on your Lightspeed store.
专业支持: Lightspeed and its partner network offer custom coding services if you need professional assistance with theme modifications or complex customizations.
Weebly