Skip to content

SDKs

Tolinku provides official SDKs for all major platforms. Each SDK handles deep link resolution, deferred deep linking, event tracking, referrals, smart banners (or in-app messages), and analytics batching out of the box.

PlatformPackageRegistryLatestMin Version
Web (JS/TS)@tolinku/web-sdknpm0.5.0ES2020 / Node 18+
iOS (Swift)TolinkuSDKSwift Package Manager0.5.0iOS 15+
Android (Kotlin)com.tolinku:sdkMaven Central0.5.0API 21+
React Native@tolinku/react-native-sdknpm0.5.0React Native 0.72+
Flutter (Dart)tolinkupub.dev0.5.0Flutter 3.10+ / Dart 3.0+

The SDKs are versioned independently: a release that changes one of them does not bump the rest. 0.5.0 touched all five.

Every SDK provides the same core capabilities:

Event tracking with automatic batching (10 events or 5-second timer) and retry on failure. Events are flushed automatically when the app goes to the background. Event types are auto-prefixed with custom. if not already included.

Deferred deep linking to recover the link a user tapped before they had your app. One call, claimDeferredLink, does this on every platform: on Android it reads the Play Install Referrer, which names the exact click, and falls back to device signal matching where there is no referrer, which is always the case on iOS and the web. It also remembers that it asked, so calling it on every launch is harmless.

Referral management to create codes, track milestones, complete referrals, and query the leaderboard.

In-app messages fetched from the API and rendered in a WebView (mobile) or DOM modal (web).

Ecommerce tracking (paid plans) with 13 event types covering the full shopping journey: product views, cart management, checkout, purchase, refund, search, ratings, and more. Revenue is batched and sent to the ecommerce API with automatic cart ID lifecycle management.

The five SDKs use one name per operation. Where a package originally shipped a different name, that name still works and is not deprecated.

OperationNameOlder name still accepted
Configureconfigure (web: new Tolinku(...))React Native: init
Recover a deferred linkclaimDeferredLinknone
Report a link that opened the apptrackLinkOpenweb: not applicable
Claim with a token you holdclaimByTokenFlutter: claim
Claim by device signalsclaimBySignalsnone
Tear downdestroyAndroid and iOS: shutdown. Flutter: dispose

Web constructs an instance rather than calling configure, because a class constructor is what JavaScript does and the web SDK supports more than one instance. Everything else is identical.

All SDKs follow a similar pattern:

  1. Call configure with your publishable API key (on the web, construct a Tolinku).
  2. Set the user ID (optional, for segment targeting and analytics attribution).
  3. Claim the deferred link once, on first launch.
  4. Start tracking events and handling deep links.
// Web
const tolinku = new Tolinku({ apiKey: 'tolk_pub_...' });
tolinku.setUserId('user_123');
tolinku.track('custom.page_view');
// iOS
try Tolinku.configure(apiKey: "tolk_pub_...")
Tolinku.shared?.setUserId("user_123")
await Tolinku.shared?.track("custom.app_open")
// Android
Tolinku.configure(apiKey = "tolk_pub_...", context = this)
Tolinku.setUserId("user_123")
Tolinku.track("custom.app_open")