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.
Available SDKs
Section titled “Available SDKs”| Platform | Package | Registry | Latest | Min Version |
|---|---|---|---|---|
| Web (JS/TS) | @tolinku/web-sdk | npm | 0.5.0 | ES2020 / Node 18+ |
| iOS (Swift) | TolinkuSDK | Swift Package Manager | 0.5.0 | iOS 15+ |
| Android (Kotlin) | com.tolinku:sdk | Maven Central | 0.5.0 | API 21+ |
| React Native | @tolinku/react-native-sdk | npm | 0.5.0 | React Native 0.72+ |
| Flutter (Dart) | tolinku | pub.dev | 0.5.0 | Flutter 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.
Common features
Section titled “Common features”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 same names everywhere
Section titled “The same names everywhere”The five SDKs use one name per operation. Where a package originally shipped a different name, that name still works and is not deprecated.
| Operation | Name | Older name still accepted |
|---|---|---|
| Configure | configure (web: new Tolinku(...)) | React Native: init |
| Recover a deferred link | claimDeferredLink | none |
| Report a link that opened the app | trackLinkOpen | web: not applicable |
| Claim with a token you hold | claimByToken | Flutter: claim |
| Claim by device signals | claimBySignals | none |
| Tear down | destroy | Android 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.
Initialization pattern
Section titled “Initialization pattern”All SDKs follow a similar pattern:
- Call
configurewith your publishable API key (on the web, construct aTolinku). - Set the user ID (optional, for segment targeting and analytics attribution).
- Claim the deferred link once, on first launch.
- Start tracking events and handling deep links.
// Webconst tolinku = new Tolinku({ apiKey: 'tolk_pub_...' });tolinku.setUserId('user_123');tolinku.track('custom.page_view');// iOStry Tolinku.configure(apiKey: "tolk_pub_...")Tolinku.shared?.setUserId("user_123")await Tolinku.shared?.track("custom.app_open")// AndroidTolinku.configure(apiKey = "tolk_pub_...", context = this)Tolinku.setUserId("user_123")Tolinku.track("custom.app_open")