When a visitor starts a chat, Ticaga can display their details — name, email, company, and more — directly in the agent's Customer Details panel. You can pass this data from your site so agents immediately know who they're talking to without having to ask.
There are two ways to send customer data to the widget.
The simplest approach. Add data-user-* attributes directly to the widget <script> tag.
<script src="..."
data-widget-key="your-key"
data-user-name="Jane Smith"
data-user-email="jane@example.com"
data-user-phone="+1 555 123 4567"
data-user-company="Acme Corp"
data-user-id-code="12345"
data-user-address="123 Main St"
data-user-city="New York"
data-user-country="US"
data-custom-data='[["Plan","Enterprise"],["Account ID","ACC-99"]]'
async></script>
In practice, you would render these values server-side from the logged-in user's session:
<script src="..."
data-widget-key="your-key"
data-user-name="<?= $user->name ?>"
data-user-email="<?= $user->email ?>"
data-user-company="<?= $user->company ?>"
async></script>
The data-custom-data attribute accepts a JSON array of [label, value] pairs, useful for any data that doesn't fit the standard fields:
data-custom-data='[["Plan","Enterprise"],["Account ID","ACC-99"],["Region","EU"]]'
If you prefer to keep your data separate from the script tag — or if your values are generated dynamically — use the JavaScript queue. Declare it before the widget <script> tag:
<script>
window.TicagaChat = window.TicagaChat || [];
window.TicagaChat.push(['set', 'user:name', 'Jane Smith']);
window.TicagaChat.push(['set', 'user:email', 'jane@example.com']);
window.TicagaChat.push(['set', 'user:phone', '+1 555 123 4567']);
window.TicagaChat.push(['set', 'user:company', 'Acme Corp']);
window.TicagaChat.push(['set', 'user:id-code', '12345']);
window.TicagaChat.push(['set', 'user:address', '123 Main St']);
window.TicagaChat.push(['set', 'user:city', 'New York']);
window.TicagaChat.push(['set', 'user:country', 'US']);
window.TicagaChat.push(['set', 'session:data', [['Plan','Enterprise'],['Account ID','ACC-99']]]);
</script>
<!-- Widget script must come after the queue -->
<script src="..." data-widget-key="your-key" async></script>
If both a data attribute and a queue entry are set for the same field, the queue entry takes precedence.
| Attribute | Purpose |
|---|---|
data-user-name |
Customer's display name — shown in Visitor section header |
data-user-email |
Customer's email — shown in Visitor section header |
data-user-phone |
Phone number — shown in Customer Information sidebar |
data-user-company |
Company name — shown in Customer Information sidebar |
data-user-role |
Customer's role at their company — shown in Customer Information sidebar |
data-user-title |
Job title — shown in Customer Information sidebar |
data-user-plan |
Subscription/service plan name — shown in Customer Information sidebar |
data-user-account-id |
Actual internal billing system user ID — used to match/link to a Ticaga user account via billing_id |
data-user-id-code |
Friendly client reference code (e.g. "Client #1500") — display only in Customer Information sidebar |
data-user-language |
Preferred language — shown in Customer Information sidebar |
data-user-address |
Street address — shown in Customer Information sidebar |
data-user-city |
City — shown in Customer Information sidebar |
data-user-country |
Country code (e.g. GB) — shown in Customer Information sidebar |
data-custom-data |
JSON array of ["Label", "Value"] pairs for any extra data — shown in Custom Data sidebar section |
The widget reads identity data once when the script initialises. It is not updated dynamically after the page has loaded. If you push to window.TicagaChat after the widget script has already run, those calls are silently ignored.
For single-page applications where the user may log in without a full page reload, ensure the queue script is rendered with fresh data before the widget script loads, or trigger a full page reload after authentication so the widget reinitialises with the correct identity.
Feedback loop
Be the first to rate this guide.
Article snapshot
Error: Fix:
To get started, go to Administration → General Settings → Webhooks, then click Add and you’ll see this form: Open the settings for the Discor...
You can automatically close tickets that have been waiting for a customer response for more than two days by configuring the relevant department. O...