How to Add Asyntai AI Chatbot to Shoptet
Step-by-step guide for Shoptet e-shops
步骤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: Open the HTML Codes Editor in Shoptet
Shoptet has a built-in section for inserting custom HTML and JavaScript, so you never need to touch the theme's source files:
- Log in to your Shoptet administration
- In the left-hand menu, open Appearance and content (Czech: Vzhled a obsah)
- Click Editor
- Select HTML code (Czech: HTML kód)
注意: This section is available on all Shoptet plans and is intended for advanced users. Shoptet technical support does not assist with custom HTML, CSS, or JavaScript, so keep a copy of anything you paste here.
Step 3: Paste the Embed Code into the Footer Field (Recommended)
The HTML code editor has several fields. To load the chatbot on every page of your e-shop, use the footer field:
- Find the field labelled Footer (before the closing BODY tag) (Czech: Zápatí (před koncovým tagem BODY))
- Paste your Asyntai embed code into this field:
<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>
- Click Save to apply the change
- The chatbot will now appear on all pages of your store automatically
提示: Placing the code in the footer field (before the closing BODY tag) ensures the page content loads first, so the chat widget never slows down your store.
Alternative: Use the Header Field
If you prefer to load the script in the page head, the same HTML code editor offers a header field:
- In Appearance and content → Editor → HTML code, find the field labelled Header (before the closing HEAD tag) (Czech: Záhlaví (před koncovým tagem HEAD))
- Paste the same Asyntai embed code into this field
- 点击 Save
注意: You only need to add the embed code in one place. Use either the footer field or the header field, not both, to avoid loading the widget twice. The footer field is recommended for the best page performance.
步骤 4:验证安装
After saving your changes, open your Shoptet e-shop 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 saved the HTML code field. Clear your browser cache or view in incognito mode. Shoptet may cache pages, so changes can take a few minutes to appear. Check the browser console (F12) for any JavaScript errors.
需要帮助?
The HTML code section is intended for advanced users, and Shoptet support does not help with custom code. If you get stuck, contact Asyntai support for guidance on installing the chatbot on your Shoptet store.
专业支持: If you would rather not edit the code yourself, a Shoptet partner or freelance developer can add the embed snippet for you in just a few minutes.
Weebly