Website widget
A chat bubble for any website: Shopify, WordPress, Wix, a custom site or a link-in-bio page. One line, no other code.
Install
Copy your public key
Find it in Dashboard → Channels. It starts with
pk_.Paste the snippet
Add this line before
</body>on every page.Open your site
The chat button appears in the corner. Ask it something.
<script src="https://nightshift.vn/widget.js" data-key="pk_..." defer></script>Note
The public key can only ask questions, so it is safe to put in your HTML. If someone misuses it, rotate it in Channels and update your snippet.
Attributes
| Attribute | Default | What it does |
|---|---|---|
data-key | required | Your site's public key. |
data-color | #ffd1dc | Brand colour of the button, header and customer bubbles (hex). |
data-title | AI name | Title in the widget header. |
data-greeting | Hi there 👋 | First line on the home screen. |
data-position | right | right or left corner. |
data-api | script origin | API address, if it differs from where widget.js is served. |
<script src="https://nightshift.vn/widget.js"
data-key="pk_..."
data-color="#b83a68"
data-title="Acme Support"
data-greeting="Xin chào 👋"
data-position="left"
defer></script>How it behaves
- Renders inside a Shadow DOM: your site's CSS cannot break it, and it cannot break your site.
- Follows the visitor's light or dark preference and goes full-screen on phones.
- The conversation is kept only in the visitor's browser and forgotten after 24 hours.
- Suggested questions come only from answers you taught, never from other customers' questions.
- Customers can tap “Chat with a person here” at any time, or use your contact links. When a teammate joins, the widget shows who is there and their replies arrive within seconds.
“Powered by Nightshift”
On the Free plan the widget shows a small “Powered by Nightshift” line. On paid plans it's hidden automatically.