Quick Start
Complete your TWT Chat integration in about five minutes.
Step 1: Get the installation code
Sign in to the TWT Chat agent console, go to Settings > Website Code, and copy the installation snippet.
Step 2: Paste it into your page
Copy and paste the following code before the closing </body> tag on every page where chat should be available:
<!-- Start of TWT Chat code -->
<script>
window.__twt__config = {
appid: 'YOUR_APP_ID',
lang: 'zh-cn',
theme: 'light',
sbs: '',
sbs_mm: '',
ranstr: '',
name: '',
nickname: '',
email: '',
phone: '',
icon: '1'
};
(function (n, t) {
var e = {
init: function () {
var n = t.createElement('script');
n.async = !0;
n.type = 'text/javascript';
n.src = 'https://visitorchat.twt.com/install/core.js?version=v1.2';
t.head.appendChild(n);
}
};
e.init();
})(window, document);
</script>
<!-- End of TWT Chat code -->
Step 3: Verify the installation
Refresh the page. You should see the chat launcher in the lower-right corner. Click it to start a conversation.
Next Steps
- Configuration - Adjust appearance and behavior
- JavaScript API - Control the widget programmatically
- Pass Customer Information - Sync signed-in user data into chat