Tell the chat bot who is signed in
If your website has signed-in users, add their details to the Aura snippet. Your team then sees who they are on Aura's Live page, and the bot can tailor its answers, for example to the visitor's plan. It's optional: without it, visitors stay anonymous.
1. Add attributes to the snippet
Copy the snippet from your bot's Go live step in Aura, and add a data-visitor-… attribute for each detail:
<script async src="https://aura.oneinfer.ai/widget.js" data-bot-id="bot_…"
data-visitor-name="Priya Sharma"
data-visitor-email="priya@example.com"
data-visitor-plan="Pro"
data-visitor-credits-left="120"
></script>
| Attribute | What it is |
|---|---|
data-visitor-name | Their name. The bot and your team see it. |
data-visitor-email | Their email. Only your team sees it; the bot never does. If nobody is online when they ask for a person, replies go to it. |
data-visitor-id | Your own id for them. Only your team sees it. |
data-visitor-anything | A detail the bot and your team see: data-visitor-plan becomes "plan", data-visitor-credits-left becomes "credits left". Up to 20. |
2. Fill them in from your site
Your site's templates already know who is signed in. Put their values in the attributes, and leave them empty for visitors who aren't signed in. Let your template escape the values, as it does for any HTML.
PHP
data-visitor-name="<?= htmlspecialchars($user->name ?? '') ?>"
data-visitor-plan="<?= htmlspecialchars($user->plan ?? '') ?>"
WordPress (in your theme's footer)
<?php $user = wp_get_current_user(); ?>
data-visitor-name="<?php echo esc_attr( $user->display_name ); ?>"
data-visitor-email="<?php echo esc_attr( $user->user_email ); ?>"
Django or Jinja
data-visitor-name="{{ user.get_full_name }}"
data-visitor-plan="{{ user.profile.plan }}"
Ruby on Rails
data-visitor-name="<%= current_user&.name %>"
data-visitor-plan="<%= current_user&.plan %>"
Single-page apps (React, Vue, Angular…)
If people sign in without the page reloading, tell the widget from your code instead:
// After sign-in
window.Aura?.setVisitor({ name: user.name, email: user.email, details: { plan: user.plan } });
// After sign-out
window.Aura?.setVisitor(null);
Good to know
- It isn't verified. Anyone can change these values in their browser, so treat them as a hint, not proof of who someone is. Don't let the bot's instructions grant anything based on them.
- The bot's instructions can use them, for example: If the visitor's plan is Pro, mention priority support.
- What Aura keeps: the details are kept with the visit for 30 days and, if they chat, with the chat for 12 months. Mention this in your privacy policy.
- Limits: names and ids up to 100 characters, emails up to 200, and up to 20 details of up to 200 characters each.