Skip to content

what every sdk does

How an event gets to Rabolic.

The SDKs follow one protocol, so an event from a browser, a phone or a server is queued, batched and retried by the same rules. You call track(); the SDK does the rest.

  1. 1

    event_id · uuidv7

    Each event gets its id once

    An event is stamped with an id and the time it happened when you call track(). The id never changes, so a retried batch can’t count anything twice: the server stores each event id once.

  2. 2

    rb_queue

    It waits in a queue

    Browsers keep the queue in localStorage, React Native apps in AsyncStorage and Flutter apps in a file, so events survive a reload, a restart or a flight in airplane mode. The Node SDK keeps it in memory. When the queue is full, the oldest events go first.

  3. 3

    POST /v1/batch

    Batches go out in order

    Every 20 events, on a timer, and when the page is hidden or the app goes to the background. One request at a time, up to 500 events each, in the order the events happened.

  4. 4

    429 · Retry-After

    Failures are retried, not lost

    Server errors and timeouts back off from 1 second to 5 minutes, with jitter. A rate limit waits as long as Retry-After says, a batch that is too large is split in half, and an invalid key stops sending without dropping the queue.

side by side

One set of rules, three runtimes.

Each SDK fits where it runs: the browser shares sessions across tabs, apps start a session at launch, and servers name the person on every event.

How the web, Flutter and Node.js SDKs compare
WhatWebReact NativeFlutterNode.js
KeyPublishable rb_pub_Publishable rb_pub_Publishable rb_pub_Secret rb_live_ or rb_test_
QueuelocalStorage, 1,000 eventsAsyncStorage, 10,000 eventsA file on iOS and Android (10,000 events), localStorage on the web (1,000)Memory, 10,000 events
SendsEvery 20 events or 5 s, and on page hideEvery 20 events or 15 s, and on backgroundEvery 20 events or 15 s (5 s on the web), and on backgroundEvery 20 events or 10 s, and on flush() and shutdown()
SessionsNew after 30 min idle or a new campaign; tabs share oneNew at launch, and after 30 s in the backgroundNew at launch, and after 30 s in the backgroundNo session id: each event names its person
Automatic events$pageview, $page_leave$app_* lifecycle, $screen with trackNavigation$app_* lifecycle, $screen with the observerNone
Identityidentify(), reset()identify(), reset()Rabolic.identify(), Rabolic.reset()identify({ userId, anonymousId })
Consentgranted, pending, denied, cookielessgranted, pending, deniedgranted, pending, deniedYour server decides

a few lines each

The first event, in the language you use.

Create a project, copy its key, and send an event. It shows up in the dashboard’s live events within seconds, which is also how you know the SDK works.

  • Publishable rb_pub_ keys for browsers and apps
  • Secret rb_live_ and rb_test_ keys for servers
  • debug: true logs every call while you integrate
  • host sends through your own domain
import { rabolic } from '@rabolic/web'

rabolic.init({ projectKey: 'rb_pub_…', trackRoutes: true })

// after signup or login
rabolic.identify(user.id, { plan: 'pro' })

rabolic.track('signup_completed', { method: 'google' })

not available yet

Native Swift and Kotlin.

There is no Swift or Kotlin SDK yet; native iOS and Android SDKs are planned. Today, apps built with React Native or Flutter on iOS and Android have an SDK each, with screens, lifecycle events and a queue that survives restarts.

A native app can send events to the ingest API itself. It then has to keep the anonymous id, sessions, the queue and retries the way the protocol describes, which is what the SDKs do for you.

sdk faq

The SDKs, answered.

Which SDK should I use?

The web SDK for websites and single-page apps, the React Native SDK for React Native and Expo apps, the Flutter SDK for Flutter apps on iOS, Android and the web, and the Node.js SDK on your server, for events your backend knows about and for revenue. Anything else can send events to the ingest API over HTTPS. Most products use two: one on the client and Node.js on the server.

Are the SDKs open source?

Yes, under the MIT license, at github.com/rabolic/sdks. Releases are published from GitHub Actions: npm packages with provenance, the Flutter package with automated publishing on pub.dev, and no stored publishing tokens.

Is there a native iOS or Android SDK?

Not yet; native Swift and Kotlin SDKs are planned. Today the React Native and Flutter SDKs cover iOS and Android apps built with them. A native app can send events to the ingest API itself, but then it has to keep ids, sessions, the queue and retries the way the protocol describes.

Can a tracking call crash my app?

No. No SDK method throws into your code. An invalid call is dropped, and with debug: true the SDK logs why. The only exception is the Node.js constructor, which throws for a missing or wrong key, because that is a deployment mistake rather than a tracking call.

What happens when a device is offline?

Events wait in the queue: in localStorage in browsers, in AsyncStorage in React Native apps and in a file in Flutter apps, so they survive reloads and restarts. They are sent when the connection is back. Events older than 7 days are dropped before sending.

What do the SDKs never collect?

Advertising ids (IDFA, GAID), form field values, the clipboard, location and device fingerprints. Rabolic’s servers use the IP address to look up the country and city, then drop it.

Can I send events through my own domain?

Yes. Every SDK has a host option for a first-party proxy; the default is https://ingest.rabolic.com.

Do I have to update the SDKs to keep sending events?

Rabolic accepts every SDK version released in the last 24 months, and the protocol only gets additive changes. Updating brings fixes: they ship in the latest version of each package.

Send your first event today.

Start a 3-day trial without a card. It begins with your first event, so you can set up the SDKs first.

  1. 1

    Create a project

    Sign up, name your project, and copy its publishable key.

  2. 2

    Add an SDK

    Web, React Native, Flutter or Node.js, or the HTTP API. Or run npx rabolic init.

  3. 3

    Watch the first event arrive

    It shows in live events within seconds, and your trial starts then.