SDK methods

Core methods on the default traceiq singleton (feature flags are covered in their own section).

ts
// Identify the current person (creates/updates a user profile)
traceiq.identify({ userId: 'user_123', traits: { email: 'a@b.com', plan: 'pro' } });

// Track a custom event with properties
traceiq.track('checkout_started', { cartValue: 4200, currency: 'NGN' });

// Track a page view
traceiq.page('Pricing');

// Associate the person with an organization / account
traceiq.group({ organizationId: 'org_123', traits: { plan: 'growth' } });

// Report a handled error
traceiq.captureException(new Error('Payment failed'), { orderId: 'ord_1' });