网站组件

Add your Text.st widget to Shopify

You will add the Text.st Website Widget to your Shopify site and confirm it works after publishing.

最后更新于 2026 年 10 月 3 日

开始前

  • 在 Text.st 的“网站小组件”中创建或打开您的小组件。
  • 请原样复制该小组件显示的安装代码片段,因为它用于识别您的小组件。
  • Make sure you can edit the theme layout file on your Shopify site.

代码片段示例

Your snippet loads the Text.st widget from https://app.text.st/api/public/widget/loader.js and carries your widget key. The full snippet looks like this:

<script async src="https://app.text.st/api/public/widget/loader.js" data-textst-key="YOUR_WIDGET_KEY"></script>

在 Text.st 仪表盘的“小组件 → 安装”中点击“复制代码”时,YOUR_WIDGET_KEY 会自动替换为您工作区实际的 24 字符密钥。

请始终粘贴从 Text.st 复制的完整代码片段,而非此示例,以确保包含您的小组件设置。

Install on Shopify

如果您希望在编辑代码前保留备份,请先复制主题。

  • Step 1: In Shopify admin, open Online Store, then Themes.
  • Step 2: Next to your current theme, choose the menu and select Edit code.
  • Step 3: Open layout/theme.liquid.
  • Step 4: Paste your Text.st snippet just before the closing body tag.
  • Step 5: Select Save, then open your storefront in a new private window to confirm the widget loads.

发布后测试

  • 在隐私或无痕窗口中打开已发布的线上页面。
  • 刷新页面并等待几秒钟,直到小组件出现。
  • 打开小组件,使用您自己的电话号码提交测试请求。
  • 查看 Text.st 中的潜在客户收件箱,确认请求已收到。
  • 在手机和电脑上都进行测试。

故障排查

  • 小组件未显示:请确认网站已发布,并清除网站或浏览器缓存。
  • 仍未显示:请确认代码片段完整,且未被编辑器或插件修改。
  • 显示了两次:请删除其他页面或设置中重复的代码片段。
  • 仅在部分页面有效:请检查代码是添加到了所有页面,还是仅添加到了单个页面。
  • 潜在客户收件箱中未显示咨询:请确认复制的代码片段来自正确的小组件和工作区。
  • 正式短信未发送:必须完成短信审批并激活后,才能发送正式短信。