跳轉到主要內容

Documentation Index

Fetch the complete documentation index at: https://docs.tinyinbox.co/llms.txt

Use this file to discover all available pages before exploring further.

每個 TinyInbox 網站都有自己的小工具程式碼。把它安裝到需要讓訪客聯絡你的頁面。

複製程式碼

在儀表板打開 Install widget,複製該網站的 script 標籤。
<script
  async
  src="https://api.tinyinbox.app/widget.js"
  data-tinyinbox-site="tin_your_site_key"
></script>

貼到你的網站

把 script 貼到 </body> 前面。多數網站架設工具和 CMS 都有自訂程式碼區塊可以使用。 請使用儀表板提供的完整程式碼。每個網站都有唯一的網站金鑰。

網域檢查

如果網站有設定網域,小工具的 session 請求必須來自該主機。TinyInbox 會在發出小工具 session token 前檢查瀏覽器的 OriginReferer

加入訪客資訊

如果你的網站已經知道訪客姓名或 email,可以在小工具載入後傳給 TinyInbox。
window.TinyInbox = window.TinyInbox || []
window.TinyInbox.push([
  "identify",
  {
    name: currentUser.name,
    email: currentUser.email,
  },
])
如果訪客已登入,且你需要讓後端信任訪客 ID、姓名或 email,請使用已登入訪客辨識