Skip to content
Docs

Mobile

SDK overview

Which SDK to use, what they share, how requests are signed, and what has been verified on which platform.

Metrixed ships two native SDKs and three thin wrappers. All of them talk to the same ingest endpoints (mobile apps); you can also skip the SDK and send server-to-server events.

SDKLanguage and minimumGuide
AndroidKotlin, API 21, one AAR, no third-party HTTP stackAndroid SDK
iOSSwift, iOS 13, Swift Package and CocoaPodsiOS SDK
FlutterDart plugin over the native SDKsFlutter plugin
React NativeJS module and Expo config plugin over the native SDKsReact Native module
UnityC# package over the native SDKsUnity package
Webdtk.js, under 6 kB gzippedtracking methods

Choose the native SDK for a native app and the wrapper for your framework. Wrappers contain no tracking logic: the offline queue, request signing, attribution, SKAdNetwork and consent enforcement live in the native SDKs, so behaviour is identical everywhere and a shared contract file (sdks/test-vectors/wrapper-api.json) keeps the wrapper method names aligned.

Package names

SDKInstallEntry point
Androidcom.metrixed:metrixed-android (OEM referrers: com.metrixed:metrixed-android-referrer-huawei, -samsung, -xiaomi, -vivo)com.metrixed.sdk.Metrixed
iOSSwift Package products Metrixed and MetrixedCore, or pod 'Metrixed'Metrixed
Fluttermetrixed_flutterMetrixed
React Native@metrixed/react-native (Expo plugin included)Metrixed
Unitycom.metrixed.unityMetrixed.MetrixedSDK
Webdtk.js from your tracking domaindtk(...)

Android and the wrappers default to https://ingest.metrixed.com (change it with setBaseUrl or the wrapper's baseUrl option); on iOS you pass baseURL explicitly. The iOS privacy manifest declares track.metrixed.com as its tracking domain; if you set your own trackingBaseURL, add that host to your app's manifest.

The SDKs were called DTrackier before the first release. For one release the old entry points still compile and forward to the new ones, marked deprecated: DTrackier (iOS, also the DTrackier / DTrackierCore Swift Package products), com.dtrackier.sdk.DTrackier and the com.dtrackier.sdk type aliases (Android), DTrackier, DTrackierError and withDTrackier (React Native), DTrackier (Flutter) and DTrackierSDK (Unity). Package coordinates themselves changed, so update the dependency line when you upgrade. The aliases are removed in 2.0.

What every SDK does

  • Install and session reporting with the install-referrer or device identifiers, and a persistent SDK-generated install id.
  • Events with revenue as a six-decimal string and a currency, a dedupe_id for idempotency, callback parameters (sent back to the advertiser) and partner parameters (forwarded to the traffic source).
  • Ad revenue from mediation networks.
  • Deep links: scheme and universal links, deferred deep links, re-engagement. See deep links.
  • Consent and privacy: a consent object on every payload (ATT, TCF, GPP, Google DMA), third-party-sharing switch, kids mode (no advertising ids), and forgetMe erasure.
  • Offline queue with retries, so events survive connectivity loss.
  • Sandbox environment: every payload is flagged and excluded from billing.
  • Request signing: HMAC-SHA256 with the app's SDK secret over timestamp + "." + body, sent as X-Dt-Timestamp and X-Dt-Signature next to X-Dt-App-Token; the secret can be rotated without breaking old builds because the server accepts the previous secret during rollout. Test vectors live in sdks/test-vectors/signing.json.
  • iOS only: ATT prompt handling, SKAdNetwork and AdAttributionKit conversion-value updates from the server schema (SKAN), AdServices token for Apple Search Ads, StoreKit 2 forwarding, a privacy manifest.
  • Android only: Play Install Referrer plus optional OEM referrer providers (Huawei, Samsung, Xiaomi, Vivo), GAID and App Set ID reading with opt-outs, Play purchase and subscription forwarding.

Testing your integration

  1. Create the app and note its token and secret (GET /apps/{id}/sdk-config).
  2. Initialise with the sandbox environment and a test device.
  3. Click a test link (test=1) for the app, install, open, and fire an event.
  4. Look the device up under Insights, Device inspector in the admin portal: attribution, match type, events and consent are shown, and "forget device" resets it.

Status of each SDK in this release

Be aware of what has and has not been exercised, so you plan your release testing:

Verified automaticallyNot verified here
Android88 JVM tests including the shared signing vectors, AAR and sample build, and a signed round trip against a real ingest process.The instrumentation tests run only in the repository's emulator CI job. OEM referrer providers use reflection with vendor class names that are best effort and unverified on devices. Play purchase tokens are forwarded as events; server-side verification with Google is not implemented. Publishing to Maven Central needs release credentials.
iOS51 Linux tests for the core, signing and conversion-value vectors, and a round trip against ingest.Everything that needs Apple frameworks (ATT, IDFA/IDFV, AdServices, SKAdNetwork, AdAttributionKit, StoreKit 2, lifecycle) compiles only in the repository's macOS CI job. Treat the AdAttributionKit calls as needing a first run on a Mac.
Flutter, React Native, UnityDart, Jest and NUnit tests, the React Native Android bridge against the real AAR, and example builds.iOS pods and simulator builds, and Unity Editor compilation, run only in CI jobs that need macOS or a Unity licence. Nothing is published to pub.dev, npm or the Unity registry yet.

The SDK guides that follow are the repository READMEs, included unchanged apart from link fixes.