跳至主要内容

快速接入

在你的網站每個頁面中嵌入 TWT Chat 聊天小部件。

第 1 步:取得安裝程式碼

登入 TWT Chat 客服端,進入 設定 > 安裝 > 網站程式碼,複製安裝程式碼。

範例程式碼如下:

<!-- Start of TWT Chat code -->
<script>
window.TWTChatWidget = window.TWTChatWidget || {
_q: [],
on: function () {
this._q.push(["on", Array.prototype.slice.call(arguments)]);
},
};

window.__twt__config = {
appid: "以專案 APPID 為準",
icon: "1",
};

(function (n, t) {
var e = {
init: function () {
var n = t.createElement("script");
n.async = !0;
n.type = "text/javascript";
n.src = "https://visitor.chattwt.com/install/core.js?version=v1.2";
t.head.appendChild(n);
},
};
e.init();
})(window, document);
</script>
<!-- End of TWT Chat code -->

第 2 步:貼到網頁中

在每個網頁的 </body> 標籤前,貼上複製好的網站程式碼。

第 3 步:驗證

重新整理網頁後,頁面右下角應出現聊天浮窗圖示。點擊即可開始對話。

還沒有帳號?

免費註冊 TWT Chat 取得網站程式碼,快速完成接入。