When customers start a chat, you see "Guest" by default. Use the Events API to show their real name and contact info so your team can provide better support.
Go to your TidySupport dashboard and navigate to Settings → Widget. Copy your workspace ID.
Add this snippet before the TidySupport widget script. Replace the template variables with actual values from your backend or session.
<script>
window.TidySupportConfig = {
userId: "{{ current_user.id }}",
email: "{{ current_user.email }}",
name: "{{ current_user.name }}",
// Optional custom attributes:
plan: "{{ current_user.plan }}",
company: "{{ current_user.company }}"
};
</script>The userId, email, and name fields are the most useful. Custom attributes like plan and company are optional and appear in the contact sidebar.
The syntax above uses generic template placeholders. Replace them with the actual values your backend or framework provides. For example, in a Next.js app you might pass them as props from a server component or read them from a session cookie.
Start a chat on your site while logged in as a test user. Open your TidySupport inbox and check that the new conversation shows the contact's name and email instead of "Guest".
Wrap the config block in a conditional check so it only runs when a user is authenticated. Anonymous visitors will still be able to chat — they will just appear as "Guest" until they provide their details.