Conversations
Visitor Sessions
Manage anonymous visitors, user identification workflows, GDPR cookie compliance, and trait synchronization.
Overview
A Visitor Session encapsulates identity and state for a single human interacting with your website. Asiyst supports privacy-first anonymous visitors by default, with seamless upgrades to identified user accounts when visitors log into your platform.
Anonymous Visitor Tracking
When a visitor lands on your website without signing in:
- The SDK generates a cryptographically secure, anonymous UUID (
vis_anon_...).
- No personally identifiable information (PII) such as IP addresses, names, or emails is stored.
- The anonymous identifier persists in
localStorageso the assistant remembers past questions if the user returns within 30 days.
Identifying Authenticated Users
When a user logs into your website or application, call Asiyst.identify() to link their profile and traits:
import { Asiyst } from "@asiyst/sdk";
// Call immediately following successful user sign-in
Asiyst.identify({
userId: "usr_992140",
email: "sarah.connor@cyberdyne.com",
name: "Sarah Connor",
traits: {
planTier: "Enterprise Pro",
seats: 45,
joinedDate: "2024-01-15",
isBillingAdmin: true,
},
});
Why Identify Users?
- Contextual Intelligence: The assistant can tailor its responses based on the user's plan (e.g. knowing whether they have access to Enterprise features).
- Omnichannel History: Conversations synchronize across mobile, tablet, and desktop browsers when signed in with the same
userId.
- Analytics: Segment conversation completion rates and satisfaction scores by customer tier.
GDPR & Privacy Controls
Asiyst is fully compliant with GDPR, CCPA, and SOC 2 Type II:
- Zero Data Training: Your customer conversations and traits are never used to train foundation models.
- Right to Erasure: Issue a deletion request via API to cryptographically purge all conversations associated with a
userId:curl -X DELETE https://asiyst.com/api/v1/projects/proj_9f8a2b3c4d/visitors/usr_992140 \-H "Authorization: Bearer $ASIYST_API_TOKEN"
Session Revocation on Logout
Always trigger Asiyst.logout() when a user logs out of your site to prevent identity leakage on shared machines:
function handleUserLogout() {
authService.logout();
Asiyst.logout(); // Clears user tokens and resets to anonymous state
}