Quickstart
Your Tiketo contact will provide separate client IDs for staging and production. Add this snippet just before </body>. You can also use it in a Google Tag Manager Custom HTML tag with document.write disabled.
<script> window.tiketoChat = window.tiketoChat || function () { (tiketoChat.q = tiketoChat.q || []).push(arguments); }; tiketoChat("init", "TC-XXXXXXXX");</script><script async src="https://chatbot.tiketo.cloud/embed/stable/loader.js"></script>Reload the page. The launcher should appear in its configured corner and open to the welcome screen. If it does not, check the browser console and the /config/TC-XXXXXXXX.json request.
Staging and production
Section titled “Staging and production”IDs are tied to one environment and allowed-origin list. Never use a staging ID on production or a production ID locally.
| Environment | Embed origin | Available paths | ID |
|---|---|---|---|
| Production | https://chatbot.tiketo.cloud |
vX.Y.Z, stable, latest |
production ID from Tiketo |
| Staging | https://staging.chatbot.tiketo.cloud |
git-<sha> (or git-<sha>-run-<run-id>), latest |
staging ID from Tiketo |
For staging, change both the origin and path. Use latest while testing, or copy the immutable version from the published manifest and pin that URL.
<script async src="https://staging.chatbot.tiketo.cloud/embed/latest/loader.js"></script>Verify on a blank page
Section titled “Verify on a blank page”Ask Tiketo to allow the exact http://localhost:<port> or http://127.0.0.1:<port> origin for your staging ID. Local access is not enabled by default. Save this as index.html, replace the ID, serve it from the agreed origin, and open the HTTP URL instead of file://.
<!doctype html><html lang="en"> <head> <meta charset="utf-8" /> <title>Tiketo chat check</title> </head> <body> <h1>Tiketo chat check</h1> <script> window.tiketoChat = window.tiketoChat || function () { (tiketoChat.q = tiketoChat.q || []).push(arguments); }; tiketoChat("init", "TC-XXXXXXXX"); </script> <script async src="https://staging.chatbot.tiketo.cloud/embed/latest/loader.js"></script> </body></html>Choose an embed version
Section titled “Choose an embed version”- Production
stableis Tiketo’s manually promoted recommendation. - Environment-specific
latestfloats and is intended for staging verification. - Production
vX.Y.Zand staginggit-<sha>(orgit-<sha>-run-<run-id>) paths are immutable.
The staging latest manifest contains the exact immutable version it resolves to. See Versions and updates for the command.
Add context and handlers
Section titled “Add context and handlers”Queue initial context before init. Replace the snippet from the first step with this complete version; it keeps a single init per page. See Host actions for handler timing and behavior.
<script> window.tiketoChat = window.tiketoChat || function () { (tiketoChat.q = tiketoChat.q || []).push(arguments); }; tiketoChat("action", "whereAmI", function () { return { route: location.pathname }; }); tiketoChat("context", { locale: document.documentElement.lang, pageTitle: document.title, }); tiketoChat("init", "TC-XXXXXXXX");</script><script async src="https://chatbot.tiketo.cloud/embed/stable/loader.js"></script>Only register names and payload shapes Tiketo supplied for your chatbot.