Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.insito.app/llms.txt

Use this file to discover all available pages before exploring further.

This walks you through everything from a fresh account to a real response landing in the dashboard. Total wall-clock: about five minutes, three of which are npm install.

Prerequisites

  • An iOS or Android React Native app you can rebuild today. Expo managed and bare workflows are both supported (RN >= 0.72, React >= 18, AsyncStorage >= 1.21).
  • Five minutes.

1. Create a workspace and project

1

Sign up

Head to admin.insito.app, pick an email + password, and confirm via the email you receive.
2

Finish onboarding

Name your workspace, give your first project a name (one project = one app), and pick React Native as the platform. We’ll show you the API key on the next screen — keep it; you’ll paste it into your app in a moment.
3

Save the API key

The key starts with proj_ and looks like proj_e014b2efbf474530955c48d40c5bb794. Drop it in your password manager or .env file — it’s a project secret.

2. Install the SDK

npm install @insito/react-native @react-native-async-storage/async-storage
AsyncStorage is a peer dependency. The SDK uses it for the persistent offline queue so responses survive bad networks and app cold-starts. If you’re already using AsyncStorage you can skip this part.

3. Initialise the SDK

Call MicroSurvey.init() once at app startup with the API key from step 1, then wrap your app in <InsitoProvider> so the modal can render.
app/_layout.tsx
import { useEffect } from "react";
import { Stack } from "expo-router";
import { InsitoProvider, MicroSurvey } from "@insito/react-native";

MicroSurvey.init({
  apiKey: "proj_e014b2efbf474530955c48d40c5bb794",
  debug: __DEV__,
});

export default function RootLayout() {
  useEffect(() => {
    void MicroSurvey.identify({
      userId: "user-from-your-auth-system",
      platform: "ios",
      appVersion: "1.0.0",
    });
  }, []);

  return (
    <InsitoProvider>
      <Stack />
    </InsitoProvider>
  );
}
init() is safe to call from a module top-level (executes once at bundle load). identify() ties subsequent triggers to a stable user — call it as early as you can after login.

4. Build a survey

Back in admin.insito.app:
1

New survey

Open your project, click New survey.
2

Configure

Give it a name (Checkout NPS), set the trigger key to checkout_completed, leave throttling at its default (28 days), and add one question — nps type, text “How likely are you to recommend us to a friend?”.
3

Activate

Toggle the survey to Active and save.
See Creating surveys for a longer walk-through of the builder.

5. Fire the trigger

Find the point in your app where the matching event happens — for our example, the screen shown after a successful checkout — and call:
import { MicroSurvey } from "@insito/react-native";

void MicroSurvey.trigger("checkout_completed");
The SDK round-trips the event to the API, evaluates throttling + audience rules server-side, and either:
  • Renders the modal (the user sees question 1 immediately), or
  • Returns silently (the trigger fired but no survey was eligible).

6. Watch the response land

Submit an NPS in your dev build. Switch back to admin.insito.app/projects/<your project> and you’ll see:
  • Analytics tab updates within ~1s (NPS score, trend, distribution).
  • Responses tab gets the new row with the answer attached.
  • Slack posts a notification if you’ve connected an integration (wire up Slack).

You’re done

That’s the full loop. Real beta partners typically deepen the integration with:

Screen tracking

Auto-discover screens so trigger keys can target specific paths.

Theming

Match the modal to your brand — colors, typography, radii.

Lifecycle events

MicroSurvey.on("response_submitted", ...) for analytics fan-out.

Slack integration

Get a Block Kit ping in #feedback for every response.