Cockpitify Help

Set up usage analytics

Add the Cockpitify SDK to your Expo, React Native, Flutter or web app to see daily, weekly and monthly actives, feature usage and a world map.

Usage analytics show who uses your app and which features they use, split by premium and free users. Screens are recorded on their own, and one line covers a feature. The data stays in your Supabase project.

Open the setup screen

On the Summary tab, tap Feature usage (or Map), then Set up usage tracking. Choose your platform: Expo / RN, Flutter, Web or HTTP. Each one shows the code, or a prompt to paste into an AI assistant.

Expo and React Native

Install the SDK:

npx expo install @cockpitify/react-native @react-native-async-storage/async-storage

Initialise it with your Supabase client and wrap the root layout so screens are recorded:

// app/_layout.tsx
import { Ops } from '@cockpitify/react-native'
import { OpsProvider } from '@cockpitify/react-native/expo-router'

Ops.init(supabase)

export default function RootLayout() {
  return <OpsProvider><Stack /></OpsProvider>
}

Using React Navigation instead of Expo Router? Use useOpsNavigation() from @cockpitify/react-native/react-navigation.

Then record what matters as events:

Ops.track('quiz_started', { level: 3 })

Pass appVersion to Ops.init (for example from Constants.expoConfig?.version) to see version adoption in Release health.

Web

Use @cockpitify/js and call Ops.init(supabase). Page views are recorded automatically.

Flutter

Call Ops.init(Supabase.instance.client) and add Ops.observer to navigatorObservers. The Flutter package isn’t on pub.dev yet; the setup screen shows its current status.

Any other platform (HTTP)

Send events with a POST to your project’s rest/v1/rpc/ops_ingest. The setup screen shows the exact body.

Not using Supabase Auth?

Pass an httpTransport with your own endpoint and token function instead of the Supabase client. No extra key is needed either way.

Check that it works

The setup screen shows Waiting for the first event… and then Usage data is arriving, with events in the last 24 hours and devices in the last 30 days.

What you get

  • Active people: today (DAU), 7 days (WAU) and 30 days (MAU), average session length and sessions per person per day.
  • Features, Events and Screens, split by premium and free users.
  • Weekly retention by cohort.
  • Funnels and the Map. See Feature usage and funnels.

Data retention and alerts

  • Keep raw events for 1 to 90 days. Daily summaries are kept for 13 months.
  • Usage alerts: turn on Notify me about drops and set the drop threshold. You’re notified when usage falls against the 7 days before, or when no data arrives for 12 hours.