Ensora
Ensora
DocumentationInstallationBasic Usage

Advanced

Error TrackingPrivacy & Utilities

API Reference

API Reference

Basic Usage

Configure the Ensora SDK and track events

Basic Usage

Configure the SDK and start tracking events in your React Native or Expo app.

Provider Setup

import { EnsoraProvider } from '@ensora/react-native';

export default function RootLayout() {
  return (
    <EnsoraProvider
      apiKey="your_api_key"
      projectId="your_project_id"
    >
      <Stack />
    </EnsoraProvider>
  );
}

Enable Touch Capture

<EnsoraProvider
  apiKey="your_api_key"
  projectId="your_project_id"
  touchCapture={true}
>
  <Stack />
</EnsoraProvider>

Touch capture records taps and swipes for heatmap generation.

Track Custom Events

import { track } from '@ensora/react-native';

// Track a button press
track('button_pressed', { screen: 'home', label: 'Sign Up' });

// Track a purchase
track('purchase_completed', { amount: 29.99, currency: 'USD', plan: 'pro' });

Auto-Captured Events

Ensora automatically captures the following events with no configuration:

EventTrigger
session_startApp foreground / first launch
navExpo Router pathname change
errorUnhandled JS exception
touchUser tap / swipe (requires touchCapture: true)

Custom Ingest URL

<EnsoraProvider
  apiKey="your_api_key"
  projectId="your_project_id"
  ingestUrl="https://your-ingest-endpoint.example.com"
>
  <Stack />
</EnsoraProvider>

Error Tracking

Unhandled exceptions are captured automatically. Add context to errors with custom events:

try {
  await riskyOperation();
} catch (error) {
  track('error_caught', { message: error.message, screen: 'checkout' });
}

Best Practices

Event Naming

  • Use snake_case for event names
  • Be descriptive: checkout_completed over done
  • Group related events with a prefix: onboarding_step_1, onboarding_step_2

Performance

  • touchCapture adds minimal overhead but only enable it if you need heatmaps
  • Batch properties into a single track() call rather than firing multiple events

Next Steps

  • Session Replay — how recordings work
  • Heatmaps — touch visualization
  • API Reference — complete SDK reference

Last updated on

Installation

Install and set up the Ensora SDK in minutes

Custom Events

Track any user action with properties

On this page

Basic Usage
Provider Setup
Enable Touch Capture
Track Custom Events
Auto-Captured Events
Custom Ingest URL
Error Tracking
Best Practices
Event Naming
Performance
Next Steps