Mobile SDKsOverview

Mobile SDKs

Datafly Signal provides native and cross-platform mobile SDKs that bring the same server-side tag management capabilities to your mobile apps. Instead of embedding multiple vendor SDKs (Meta, GA4, TikTok, etc.) directly into your app, the Datafly SDK captures events on-device and delivers them server-to-server through your Signal pipeline.

Why use the Datafly mobile SDK?

Traditional mobile analytics requires embedding each vendor’s SDK directly into your app. Each SDK adds binary size, runtime overhead, and privacy complexity:

  • App bloat — each vendor SDK adds 1—10 MB to your app binary
  • Privacy risk — vendor SDKs access device data and transmit to third-party servers
  • Maintenance burden — SDK version conflicts, breaking changes, and deprecations
  • Data silos — each vendor sees only their own events with no unified identity

Datafly replaces all of these with a single lightweight SDK.

How it works

Mobile App                       Your Server                    Vendors
┌──────────────────┐            ┌──────────────────┐          ┌──────────┐
│  Datafly SDK     │── batch ──>│ Ingestion Gateway │──batch──>│ GA4 API  │
│   (~50 KB)       │ first-party│                  │          │ Meta API │
│                  │            │  Event Processor  │          │ TikTok   │
│  .track()        │            │  Delivery Workers │          │ Pinterest│
│  .screen()       │            │                  │          │ Snapchat │
│  .identify()     │            └──────────────────┘          └──────────┘
└──────────────────┘

       └── Offline queue (SQLite)
           Retry with backoff
           Network-aware
  1. The Datafly SDK initialises with your pipeline key and endpoint
  2. Events are captured and queued in a local SQLite database
  3. Events are batched and sent to your Ingestion Gateway when connectivity is available
  4. The server processes events through your configured pipelines
  5. Delivery Workers send data server-to-server to each vendor’s API

Size comparison

ApproachBinary size addedNetwork requestsData control
Meta SDK + GA4 SDK + TikTok SDK + Pinterest SDK15—40 MBMultiple per eventThird-party
Datafly SDK~50 KB1 per batchFirst-party

Available SDKs

Native

PlatformLanguagePackageMin version
iOSSwiftDataflySignal (SPM)iOS 15+
AndroidKotlincom.datafly:signal (Gradle)API 21+ (Lollipop)

Cross-platform

FrameworkLanguagePackage
React NativeTypeScript@datafly/react-native
FlutterDartdatafly_signal
.NET MAUI / XamarinC#DataflySignal.Maui
CordovaJavaScriptcordova-plugin-datafly-signal
Capacitor (Ionic)TypeScript@datafly/capacitor

All cross-platform SDKs are thin wrappers around the native iOS and Android SDKs. They provide the same functionality and use platform channels / native modules to call through to the native implementation. This means you get native performance and reliability regardless of your framework choice.

Unified API

All SDKs share the same API surface:

initialize(config)          // Set up the SDK with pipeline key and endpoint
track(event, properties)    // Record a custom event
screen(name, properties)    // Record a screen view
identify(userId, traits)    // Link anonymous visitor to known user
group(groupId, traits)      // Associate user with a company or organisation
setConsent(categories)      // Set consent categories
handleDeepLink(url)         // Extract UTM params and click IDs from deep links
setAdvertisingId(id)        // Set IDFA (iOS) or AAID (Android)
flush()                     // Force immediate upload of queued events
reset()                     // Generate new anonymous ID (logout)

Key features

  • Zero external dependencies — native SDKs use only platform framework APIs
  • Offline-first — events are persisted to SQLite and sent when connectivity is available
  • Automatic batching — configurable flush interval (default 30s) and threshold (default 20 events)
  • Exponential backoff retry — failed uploads retry with jitter (1s, 2s, 4s, 8s, 16s, 32s)
  • Network-aware — pauses uploads when offline, resumes automatically on reconnect
  • Session tracking — 30-minute inactivity timeout with session numbering
  • App lifecycle events — automatic tracking of install, update, open, and background
  • Vendor ID generation — self-generates GA4 client_id, Meta fbp, TikTok ttp, Pinterest _pin_unauth
  • Click ID capture — extracts 13+ vendor click IDs from deep links (gclid, fbclid, ttclid, etc.)
  • Device identity — IDFV (iOS) and Android ID collected automatically; IDFA/AAID opt-in
  • Consent management — category-based consent with local persistence
  • Identity resolution — server-side anonymous-to-known stitching via canonical identity graph

Next steps