Ask0 logoAsk0

Users

Identify and track users interacting with your AI assistant. Manage team members, set permissions, and monitor user engagement.

Ask0 allows you to identify users interacting with your AI assistant, providing personalized experiences and enabling you to track user behavior, intervene when needed, and build better customer relationships.

User Identification

The identify() API

Use the JavaScript API to identify users:

// Basic identification
window.ask0.identify({
  id: 'user_123',
  email: 'john@example.com'
});

// With additional attributes
window.ask0.identify({
  id: 'user_123',
  email: 'john@example.com',
  name: 'John Doe',

  // Standard attributes
  company: 'Acme Corp',
  plan: 'pro',
  role: 'developer',

  // Custom attributes
  customAttributes: {
    teamSize: '10-50',
    industry: 'SaaS',
    signupDate: '2023-06-15',
    monthlySpend: 499,
    features: ['api', 'webhooks', 'sso']
  }
});

Server-side Identification

Identify users via API:

// Node.js example
await ask0.users.identify({
  projectId: 'proj_123',
  userId: 'user_123',
  traits: {
    email: 'john@example.com',
    name: 'John Doe',
    company: 'Acme Corp',
    plan: 'pro'
  }
});

Automatic Identification

Integrate with your auth system:

// After user login
function onUserLogin(user) {
  // Identify in Ask0
  window.ask0.identify({
    id: user.id,
    email: user.email,
    name: user.name,
    plan: user.subscription.plan
  });
}

// On page load for logged-in users
if (currentUser) {
  window.ask0.identify(currentUser);
}

User Profiles

Profile Information

View comprehensive user details:

User Profile:
  Basic Info:
    ID: user_123
    Email: john@example.com
    Name: John Doe
    Avatar: https://...

  Account Details:
    Company: Acme Corp
    Plan: Pro ($499/mo)
    Role: Developer
    Signup: 2023-06-15

  Activity:
    First Seen: 2023-06-15
    Last Active: Today at 2:30 PM
    Total Conversations: 23
    Questions Asked: 67

Custom Attributes

Track business-specific data:

Custom Attributes:
  Business Metrics:
    LTV: $5,988
    MRR: $499
    Churn Risk: Low
    NPS Score: 9

  Product Usage:
    API Calls: 45,234/month
    Team Members: 12
    Projects: 5
    Last Login: 2 hours ago

  Preferences:
    Language: English
    Timezone: EST
    Email Notifications: Enabled
    Beta Features: Yes

User Behavior Tracking

Conversation History

Track all user interactions:

Conversation Timeline:
  Today:
    - 2:30 PM: Asked about API rate limits
    - 2:15 PM: Inquired about webhook setup

  This Week:
    - Monday: Billing question (resolved)
    - Wednesday: Feature request (noted)
    - Friday: Technical support (escalated)

  Patterns:
    Most Active: Weekday afternoons
    Common Topics: API, Integration, Billing
    Satisfaction: 85% positive

Engagement Metrics

Measure user engagement:

Engagement Stats:
  Conversations: 23 total
  Questions: 67 asked, 62 answered

  Average Metrics:
    Session Duration: 4.5 minutes
    Messages per Session: 3.8
    Response Satisfaction: 87%

  Trends:
    Activity: Increasing ↑
    Satisfaction: Stable →
    Complexity: Increasing ↑

User Journey

Map the user's path:

graph LR
    A[First Visit] --> B[Asked Getting Started]
    B --> C[Signed Up]
    C --> D[API Integration Help]
    D --> E[Successful Implementation]
    E --> F[Regular Usage]
    F --> G[Feature Requests]

User Segmentation

Automatic Segments

Users are automatically grouped:

System Segments:
  By Plan:
    - Free Users (1,234)
    - Pro Users (456)
    - Enterprise (89)

  By Activity:
    - Active (last 7 days): 892
    - At Risk (14-30 days): 234
    - Churned (>30 days): 567

  By Satisfaction:
    - Promoters (9-10): 456
    - Passive (7-8): 234
    - Detractors (0-6): 89

Custom Segments

Create your own segments:

// Define custom segment
const highValueUsers = {
  name: "High Value Users",
  conditions: {
    plan: ["pro", "enterprise"],
    monthlySpend: { gte: 500 },
    conversations: { gte: 10 },
    satisfaction: { gte: 0.8 }
  }
};

// Query segment
const users = await ask0.users.segment(highValueUsers);

User Actions

Intervention

Help users proactively:

Intervention Triggers:
  Struggling User:
    Condition: Multiple failed attempts
    Action: Offer human assistance

  High Value at Risk:
    Condition: Negative feedback + Enterprise plan
    Action: Alert customer success team

  Feature Request:
    Condition: Asking about unavailable feature
    Action: Collect feedback, notify product team

Personalization

Customize experiences per user:

// Personalized greeting
const greeting = user.plan === 'enterprise'
  ? `Welcome back, ${user.name}! Your dedicated support team is here.`
  : `Hi ${user.name}! How can I help you today?`;

// Contextual responses
if (user.role === 'developer') {
  // Show code examples
  // Link to API docs
} else if (user.role === 'manager') {
  // Focus on features
  // Show ROI information
}

User Messaging

Communicate directly with users:

In-app Messages:
  Welcome Message:
    Trigger: First conversation
    Content: Personalized onboarding

  Feature Announcement:
    Segment: Pro users
    Content: New API endpoint available

  Satisfaction Survey:
    Trigger: After 5 conversations
    Content: Quick NPS survey

Privacy & Permissions

Manage privacy preferences:

Privacy Settings:
  Tracking Consent:
    Analytics: Granted
    Personalization: Granted
    Marketing: Denied

  Data Preferences:
    Store Conversations: Yes
    Share with Team: Yes
    Use for Training: No

  Communication:
    Email Updates: Yes
    Product News: No
    Support Follow-ups: Yes

Data Rights

Honor user requests:

User Rights:
  Access:
    - Download conversation history
    - Export user profile
    - View stored attributes

  Deletion:
    - Delete conversations
    - Remove profile
    - Anonymize data

  Portability:
    - Export in JSON/CSV
    - Transfer to another account

User Analytics

Cohort Analysis

Analyze user groups over time:

Cohort Performance:
  June 2023 Signups:
    Total: 234 users
    Retained: 189 (80.7%)
    Average Conversations: 12.3
    Upgrade Rate: 23%

  July 2023 Signups:
    Total: 456 users
    Retained: 342 (75%)
    Average Conversations: 9.8
    Upgrade Rate: 19%

User Lifecycle

Track user stages:

Lifecycle Stages:
  1. Visitor:
     - First interaction
     - Not identified

  2. Trial:
     - Identified user
     - Using free features

  3. Customer:
     - Paid plan
     - Regular usage

  4. Champion:
     - High satisfaction
     - Frequent usage
     - Advocates for product

  5. At Risk:
     - Declining usage
     - Low satisfaction

API Reference

User Management API

// Create or update user
await ask0.users.upsert({
  id: 'user_123',
  email: 'john@example.com',
  attributes: {...}
});

// Get user profile
const user = await ask0.users.get('user_123');

// List users
const users = await ask0.users.list({
  filter: {
    plan: 'pro',
    lastActiveAfter: '2024-01-01'
  },
  limit: 100
});

// Update user attributes
await ask0.users.update('user_123', {
  plan: 'enterprise',
  customAttributes: {
    upgraded: true,
    upgradeDate: new Date()
  }
});

// Get user conversations
const conversations = await ask0.users.getConversations('user_123', {
  limit: 20,
  sort: 'recent'
});

// Delete user data
await ask0.users.delete('user_123', {
  deleteConversations: true,
  anonymize: false
});

Event Tracking

Track custom events:

// Track event
ask0.track('Feature Used', {
  userId: 'user_123',
  feature: 'API Integration',
  success: true
});

// Batch events
ask0.batch([
  { event: 'Page Viewed', userId: 'user_123', page: '/docs' },
  { event: 'Button Clicked', userId: 'user_123', button: 'Get Started' }
]);

Integrations

CRM Integration

Sync with your CRM:

Salesforce Integration:
  Sync Direction: Bidirectional

  Fields Mapped:
    Ask0 → Salesforce:
      - Conversation count
      - Last active date
      - Satisfaction score

    Salesforce → Ask0:
      - Account tier
      - Contract value
      - Renewal date

Analytics Platforms

Send user data to analytics:

// Segment integration
analytics.identify('user_123', {
  email: 'john@example.com',
  ask0_conversations: 23,
  ask0_satisfaction: 0.87
});

// Amplitude integration
amplitude.setUserId('user_123');
amplitude.setUserProperties({
  ask0_user: true,
  ask0_plan: 'pro'
});

Best Practices

User Management Tips:

  1. Identify users as early as possible
  2. Track meaningful attributes for your business
  3. Segment users for targeted experiences
  4. Monitor user satisfaction trends
  5. Respect privacy preferences
  6. Use data to improve support
  7. Regular cleanup of inactive users

Implementation Checklist

  • Set up user identification on login
  • Map important user attributes
  • Create key user segments
  • Configure privacy settings
  • Set up intervention triggers
  • Integrate with CRM/analytics
  • Train team on user insights
  • Regular review of user patterns

Next Steps