Tags and custom fields allow you to store additional metadata about your visitors. Use tags for quick categorization and custom fields for any key-value data you need.
Tags are simple labels for categorizing visitors:
vip, paid-user, trial, onboarding-completeCustom Fields are flexible key-value pairs for any metadata:
plan: "premium", signup-date: "2025-01-15", is-subscribed: trueAdd tags to categorize visitors:
// Add single tag
HEYO.addTag('vip');
HEYO.addTag('paid-user');
HEYO.addTag('onboarding-complete');
// Tags are stored as: 'vip', 'paid-user', 'onboarding-complete'
"VIP Customer" becomes "vip-customer".Remove specific tags:
HEYO.removeTag('trial-user');
Replace all existing tags at once:
// Replace all tags with new set
HEYO.setTags(['premium', 'active', 'verified']);
After successful payment:
// When payment completes
stripe.onPaymentSuccess(() => {
HEYO.addTag('paid-user');
HEYO.removeTag('trial-user');
});
Tracking onboarding progress:
// Step 1 complete
HEYO.addTag('onboarding-step-1');
// Step 2 complete
HEYO.addTag('onboarding-step-2');
// All done
HEYO.addTag('onboarding-complete');
User segments:
// Categorize users
if (user.isVIP) HEYO.addTag('vip');
if (user.region === 'EU') HEYO.addTag('eu-customer');
if (user.accountAge > 365) HEYO.addTag('long-term-user');
Add custom key-value data to visitors:
HEYO.setField('plan', 'premium');
HEYO.setField('signup-date', '2025-01-15');
HEYO.setField('is-subscribed', true);
HEYO.setField('monthly-revenue', 299);
"Subscription Plan" becomes "subscription-plan".Remove specific custom fields:
HEYO.removeField('temp-data');
Custom fields support three value types:
Strings:
HEYO.setField('plan', 'premium');
HEYO.setField('subscription-id', 'sub_1A2B3C');
Numbers:
HEYO.setField('account-balance', 1500);
HEYO.setField('total-purchases', 42);
Booleans:
HEYO.setField('is-verified', true);
HEYO.setField('newsletter-subscribed', false);
Custom field values are automatically formatted based on their type in the dashboard:
HEYO.setField('website', 'https://example.com');
// Displays: Clickable link with external icon
HEYO.setField('support-email', '[email protected]');
// Displays: Clickable mailto link with email icon
HEYO.setField('trial-ends', '2025-02-15');
HEYO.setField('signup-date', '2025-01-15T10:30:00Z');
// Displays: "Feb 15, 2025" with calendar icon
HEYO.setField('is-premium', true);
// Displays: Green checkmark + "Yes"
HEYO.setField('trial-expired', false);
// Displays: Gray X + "No"
HEYO.setField('total-revenue', 125000);
// Displays: "125,000" (with commas)
Track customer value and status:
// After user logs in
HEYO.identify({
userId: user.id,
email: user.email,
name: user.name,
});
// Add relevant tags
HEYO.addTag('customer');
if (user.orders.length > 0) HEYO.addTag('has-purchased');
if (user.totalSpent > 1000) HEYO.addTag('high-value');
// Set custom fields
HEYO.setField('total-spent', user.totalSpent);
HEYO.setField('order-count', user.orders.length);
HEYO.setField('last-purchase', user.lastOrderDate);
HEYO.setField('is-vip', user.isVIP);
Track subscription and usage:
// User subscription info
HEYO.setField('plan', user.subscription.plan); // "starter", "pro", "enterprise"
HEYO.setField('mrr', user.subscription.mrr);
HEYO.setField('trial-ends', user.subscription.trialEndsAt);
HEYO.setField('is-paying', user.subscription.isActive);
// Tags for quick filtering
HEYO.addTag(user.subscription.plan); // "starter", "pro", etc.
if (user.subscription.isActive) HEYO.addTag('paying-customer');
if (user.subscription.isTrial) HEYO.addTag('trial-user');
Track user progress:
// Onboarding state
HEYO.setField('onboarding-step', 'profile-setup');
HEYO.setField('onboarding-started', '2025-01-15');
HEYO.setField('completed-steps', 3);
// Tags for each milestone
HEYO.addTag('onboarding-in-progress');
// When user completes onboarding
HEYO.removeTag('onboarding-in-progress');
HEYO.addTag('onboarding-complete');
HEYO.setField('onboarding-step', 'complete');
HEYO.setField('onboarding-completed', '2025-01-20');
Qualify leads automatically:
// Track engagement
HEYO.setField('page-views', sessionStorage.pageViewCount);
HEYO.setField('time-on-site', calculateTimeOnSite());
HEYO.setField('last-visit', new Date().toISOString());
// Qualify leads
if (user.downloadedWhitepaper) HEYO.addTag('qualified-lead');
if (user.requestedDemo) HEYO.addTag('hot-lead');
if (user.company.size > 50) HEYO.addTag('enterprise-prospect');
You can also update tags and fields from your backend using our REST API:
// After payment webhook
await fetch(`/api/conversations/${conversationId}/tags`, {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body: JSON.stringify({
operation: 'add',
tags: ['paid-user', 'premium'],
}),
});
// After subscription change
await fetch(`/api/conversations/${conversationId}/fields`, {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body: JSON.stringify({
operation: 'set',
key: 'subscription-id',
value: 'sub_1A2B3C4D',
}),
});
add, remove, or set. For fields: set or remove.To ensure performance and data quality:
Tags:
Custom Fields:
"User Plan" becomes "user-plan", but displays as "User Plan" in the dashboard.Use tags when you need simple categorization:
// ✅ Good - simple categories
HEYO.addTag('premium');
HEYO.addTag('active');
HEYO.addTag('verified');
// ❌ Avoid - complex state better in fields
HEYO.addTag('plan-premium-monthly-299'); // Use custom field instead
Use custom fields for specific values:
// ✅ Good - structured data
HEYO.setField('plan', 'premium');
HEYO.setField('billing-cycle', 'monthly');
HEYO.setField('price', 299);
// ❌ Avoid - boolean states better as tags
HEYO.setField('is-premium', true); // Use tag instead
Use clear, descriptive names:
// ✅ Good
HEYO.addTag('trial-user');
HEYO.setField('subscription-plan', 'pro');
// ❌ Avoid abbreviations
HEYO.addTag('trl');
HEYO.setField('sub-pln', 'pro');
Don't over-tag or over-field:
// ✅ Good - essential info
HEYO.addTag('paying-customer');
HEYO.setField('plan', 'pro');
HEYO.setField('mrr', 99);
// ❌ Too much - overwhelming
HEYO.addTag('customer');
HEYO.addTag('paying');
HEYO.addTag('active');
HEYO.addTag('verified');
HEYO.addTag('engaged');
// ... 20 more tags
Your support team will see:
Tags appear as colored badges at the top of visitor details, making it easy to quickly identify visitor segments.
Custom Fields appear as a structured list with smart formatting:
Your team can also add, edit, or remove tags and fields directly from the dashboard.