linkrunner 5.2.0
linkrunner: ^5.2.0 copied to clipboard
Linkrunner mobile measurement partner (MMP) SDK for Flutter: install attribution, deferred deep linking, in-app events, revenue and SKAN for iOS and Android.
5.2.0 #
Added
- The SDK now reads the Meta (Facebook) SDK's anonymous ID when your app bundles the Meta SDK (for example through
facebook_app_events), and sends it withinit,signup,trackEventandcapturePayment. The backend forwards it to Meta asanon_id, so Meta can match the events Linkrunner sends to the device its own SDK already knows. No app code changes and no new dependency: apps without the Meta SDK send exactly what they sent before. - The lookup is read only, works in any start-up order, and is skipped while
privacyModeis on. - Opt out at build time:
<meta-data android:name="io.linkrunner.sdk.MetaAnonymousIdCollectionEnabled" android:value="false" />inAndroidManifest.xml, and aLinkrunnerMetaAnonymousIdCollectionEnabledBoolean set toNOinInfo.plist. - Requires the bundled native SDKs Android
io.linkrunner:android-sdk:5.2.0and iOSLinkrunnerKit 5.2.0.
5.1.0 #
Added
privacyModeinit parameter:LinkRunner().init(token, secretKey, keyId, disableIdfa, debug, privacyMode). Passtrueto stop collecting every device-level identifier. Only the SDK-generated install instance ID identifies the install. Use it for apps directed at children (COPPA, Apple Kids Category, Google Play Families).- Android: no GAID, no App Set ID, no Android ID, no local IP, no carrier name and no Meta install referrer.
- iOS: no IDFA, the ATT prompt is never shown, no IDFV, the device name is replaced by the generic model, no Google ODM and no SKAdNetwork conversion values.
- Still sent: install instance ID, device metadata (brand, model, OS version, locale, connectivity), the Google Play install referrer on Android and the Apple AdServices token on iOS. Data your app passes through
signup,setUserData,setPushTokenorsetAdditionalDatais still sent. truestays on across launches until you callinitwithfalse. Leaving it out (null) keeps the stored value. Default is off.- Trade-off: Google iOS match rates drop, because IDFV is Google's fallback ID. Server-side IP matching still works.
- Requires the bundled native SDKs Android
io.linkrunner:android-sdk:5.1.0and iOSLinkrunnerKit 5.1.0.
5.0.0 #
Payments are now sent with trackEvent. capturePayment and removePayment are deprecated.
Changed
LinkRunner().trackEvent(eventName:, eventData:, eventId:)keeps its signature and now also sends payments. WheneventDatahasamount,paymentIdandcurrency, the event is sent as a payment namedeventName. PutuserId(required; an empty string uses the user saved bysignuporsetUserData) and an optionalstatusineventDatatoo. Every other key stays as event data.statustakes aPaymentStatusvalue or its name and defaults toPAYMENT_COMPLETED. Refund a payment by sending the samepaymentIdwithPaymentStatus.PAYMENT_CANCELLED.- The native SDK checks the payment and throws a
PlatformExceptionbefore anything is sent whenpaymentIdcomes withoutamountorcurrency,amountis not a number of 0 or more,paymentIdis blank,currencyis not 3 letters,userIdis missing orstatusis not valid. amountorcurrencywithoutpaymentIdis a normal custom event, exactly as before.PaymentStatusis exported frompackage:linkrunner/main.dart.- Requires the bundled native SDKs Android
io.linkrunner:android-sdk:5.0.0and iOSLinkrunnerKit 5.0.0.
Deprecated
LinkRunner().capturePayment(),LinkRunner().removePayment(),LRCapturePayment,LRRemovePaymentandPaymentType. They still work as before on the old endpoint and show a deprecation warning. They will be removed in a future major version.models/lr_capture_payment.dartre-exportsPaymentStatus, so existing imports keep working.- Instead of
removePayment, send the samepaymentIdwithPaymentStatus.PAYMENT_CANCELLEDthroughtrackEvent.
Migration
Before:
await LinkRunner().capturePayment(
capturePayment: LRCapturePayment(
userId: 'user_123',
paymentId: 'order_456',
amount: 499.0,
type: PaymentType.FIRST_PAYMENT,
status: PaymentStatus.PAYMENT_COMPLETED,
),
);
After:
await LinkRunner().trackEvent(
eventName: 'FIRST_PAYMENT',
eventData: {
'amount': 499.0,
'paymentId': 'order_456',
'currency': 'INR',
'userId': 'user_123',
'status': PaymentStatus.PAYMENT_COMPLETED,
},
);
Rename capturePayment to trackEvent, pass the old type as eventName with the exact same spelling, and move the fields into eventData. currency is new and required. If you called capturePayment without a type (or with PaymentType.DEFAULT_PAYMENT), use eventName: 'DEFAULT'.
Payment names and dashboard mappings #
The event name you pass becomes the payment type in reports and in your dashboard event mappings, and it is stored exactly as you send it. If you used one of the old payment types, pass it in uppercase exactly as before (for example FIRST_PAYMENT or DEFAULT), so your existing mappings, reports and partner templates keep working with no change. A different spelling such as first_payment is a new payment type. If you pick a new name such as purchase, add a mapping for it in the dashboard before you release, or those payments are not sent to ad networks. capturePayment without a type was stored as DEFAULT.
4.4.2 #
- Bumped the bundled native iOS SDK to LinkrunnerKit 4.3.2. Fixes SKAdNetwork postbacks arriving with no conversion value on iOS 17.4 and above. LinkrunnerKit 4.1.0 to 4.3.1 called only
AdAttributionKit.Postback.updateConversionValueon those versions, and Apple mirrors SKAdNetwork updates into AdAttributionKit but not the other way round, so installs from SKAdNetwork-signed networks such as Meta and Google got postbacks with no conversion value. 4.3.2 calls bothPostback.updateConversionValueandSKAdNetwork.updatePostbackConversionValue. No Dart or API changes. Android is unchanged (android-sdk 4.4.0).
4.4.1 #
- Bumped the bundled native iOS SDK to LinkrunnerKit 4.3.1. Fixes an
EXC_BAD_ACCESS (KERN_INVALID_ADDRESS)crash at app launch on iOS, in frames likeDeviceData,getAttributionToken,setUserDataandmakeRequestWithRetry, that could happen wheninit,setUserData,trackEventand other calls ran at the same time. LinkrunnerKit 4.1.0 to 4.3.0 shared the cached AdServices token between those calls without a lock, and every piece of shared state is now locked. No Dart or API changes. The iOS plugin now also marks the SDK as initialized on the main thread, where every method call reads it. Android is unchanged (android-sdk 4.4.0).
4.4.0 #
- Bumped the bundled native Android SDK to 4.4.0. Android device data now includes
device_model(Build.MODEL, for exampleSM-M315F), so Device Model is filled for Android users on the dashboard and in ad network postbacks.device_nameis unchanged. No Dart or API changes. iOS is unchanged (LinkrunnerKit 4.3.0).
4.3.2 #
- Bumped the bundled native Android SDK to 4.3.2. Fixes a launch crash (
NoSuchMethodException: androidx.work.impl.WorkDatabase_Impl.<init>) in Android release builds shrunk by R8 on Android Gradle Plugin 9, for example Expo 58 release builds where shrinking is on by default. With only that crash patched,init,signup,trackEvent,capturePaymentand the other queued calls were never sent. The native SDK's consumer ProGuard rules now keep the constructors WorkManager creates by reflection, so apps need no rule of their own. No Dart or API changes. iOS is unchanged (LinkrunnerKit 4.3.0).
4.3.1 #
- Bumped the bundled native Android SDK to 4.3.1. Keystore work and blocking disk writes no longer run on the calling thread, a normal app launch does no Keystore write, and the WebView user agent is cached so it is not rebuilt on every cold start. No Dart or API changes. iOS is unchanged (LinkrunnerKit 4.3.0).
4.3.0 #
setUserDatano longer needs a customer user id, so it can be called right afterinit.LRUserData.idis now optional (String?, no longerrequired): pass only the analytics ids you have (for examplemixpanelDistinctId,amplitudeDeviceId,posthogDistinctId) and addidlater, once your app knows the user. Linkrunner sets its attribution properties (lr_campaign,lr_ad_network) on the profiles of the analytics tools you identified, when that integration is configured for your project. ExistingLRUserData(id: ...)calls compile unchanged; code that readsuserData.idnow gets a nullable value.signupstill requiresidand now throws anArgumentErrorwhen it is missing or empty.- A
setUserDatacall withoutidno longer clears the stored customer user id on either platform (the bridges used to send""), so custom events keep theiruser_id. - Added
LRUserData.moengageUserId, so MoEngage profiles receive Linkrunner attribution. - Requires the bundled native SDKs Android 4.3.0 and iOS LinkrunnerKit 4.3.0.
4.2.0 #
AttributionDatafromgetAttributionData()now hasgaidandidfa, the advertising identifiers Linkrunner recorded the install with. Use them to join Linkrunner attribution with your own data instead of reading the identifier again on the device. Both are nullable:gaidis null on iOS and when no advertising ID is available on Android, andidfais null on Android and when App Tracking Transparency is not authorized on iOS. Existing code compiles unchanged.- Requires the bundled native SDKs Android 4.2.0 and iOS LinkrunnerKit 4.2.0, which add these fields.
4.1.2 #
- Fixed a fatal Android crash from
enablePIIHashing():PlatformException(ENABLE_PII_HASHING_FAILED, Context not set)reachingPlatformDispatcher.onError. The native Android SDK required an application context that is only set insideinit(), so callingenablePIIHashing()beforeinit()— or right after an un-awaitedinit()— threw, and the Dart wrapper rethrew into an app that had nothing awaiting the call. Fixed on both sides: the bundled Android SDK is now 4.1.1, where the call is safe beforeinit()and the flag is persisted during initialization, andLinkRunner.enablePIIHashing()now logs failures instead of rethrowing, since it is a fire-and-forget configuration setter. A pre-init()call is also no longer silently discarded. iOS was never affected. enablePIIHashing(true)now hashesname,emailandphoneon Android. Before, the native Android SDK stored the flag but never applied it, sosignupandsetUserDatasent those fields in plain text while iOS sent SHA-256 hashes. Android now sends the same lowercase SHA-256 hex as iOS, so the same input gives the same hash on both platforms. Nothing changes when hashing is off. The fix ships in the bundled native Android SDK 4.1.1, so there is no Dart change.
4.1.1 #
- Fixed a Swift compiler error that broke every iOS build on
4.0.1through4.1.0: the iOS bridge passed an optionalpaymentIdintoLinkrunnerKit.capturePayment, which has required a non-optionalStringsince LinkrunnerKit 4.0.0. Builds failed withValue of optional type 'String?' must be unwrapped to a value of type 'String'regardless of your Dart code.paymentIdis now unwrapped at the method-channel boundary. No API change —LRCapturePayment.paymentIdwas already required and non-empty validated, so correct callers are unaffected. Android was never affected.
4.1.0 #
-
Added support for Google Integrated Conversion Measurement (ICM) on iOS. The native SDK fetches Google's On-Device Measurement value during initialization and forwards it to Linkrunner. There is no Dart API to call, but ICM is opt-in: it stays inactive until you add Google's SDK to your app (see below). ICM is iOS-only for now; Android is unaffected.
-
To enable ICM on iOS, add Google's On-Device Measurement SDK to your app's
ios/Podfile:pod 'GoogleAdsOnDeviceConversion'If your app already uses the Firebase iOS SDK (11.14.0+) you have it and need nothing further. LinkrunnerKit detects the SDK at runtime rather than depending on it, so apps that skip this carry none of its weight — no extra dependency, no size increase. CocoaPods adds the required
-ObjCand-lc++linker flags for you, so Flutter apps have no Build Settings changes to make. To confirm it is live, initialize withdebug: trueand look forodm_available=truein the iOS logs;odm_available=falsemeans Google's SDK is not linked. -
Bumped native iOS SDK to
LinkrunnerKit 4.1.0(ICM plus the consent model) and native Android SDK toio.linkrunner:android-sdk:4.1.0(consent model only). -
Fixed the iOS podspec version, which had drifted to
3.4.0whilepubspec.yamlwas on4.0.1. Both now track the package version. -
setConsent(LRConsent(...))for Google Ads consent:isEEA,hasConsentForDataUsageandhasConsentForAdsPersonalization, eachConsentStatus.GRANTED/.DENIED/.UNKNOWN(field names match the native iOS and Android SDKs; they are sent asis_eea,ad_user_dataandad_personalization). Call it beforeinitand again whenever your CMP state changes. Omitted signals default to.UNKNOWNand are dropped from the payload rather than sent as a denial. Supported on iOS and Android.
4.0.3 #
- Bumped the native Android SDK to
io.linkrunner:android-sdk:4.0.2to prevent signup from sending an empty install instance ID when it runs concurrently with initialization.
4.0.2 #
- Fixed
setAdditionalDataon Android by aligning the native bridge argument key with Flutter and iOS.
4.0.1 #
- Exposed ad-network attribution fields in attribution data:
adNetworkCampaignId,adSetId,adSetName,adCreativeId,adCreativeName. - Bumped native Android SDK to
io.linkrunner:android-sdk:4.0.1and native iOS SDK toLinkrunnerKit 4.0.1.
4.0.0 #
- Breaking:
paymentIdis now required incapturePayment; the call throws before dispatch when it is missing - Bumped native Android SDK to
io.linkrunner:android-sdk:4.0.0 - Bumped native iOS SDK to
LinkrunnerKit 4.0.0
3.10.0 #
- Added
setCustomerUserId(userId)method to attach your own user identifier to the device afterinit()— once set, the id is stored on-device and automatically included in everytrackEventcall, so you no longer need to pass it on each event. Throws if the id is empty. - Bumped native Android SDK to
io.linkrunner:android-sdk:3.9.1and native iOS SDK toLinkrunnerKit 3.11.0for nativeuser_idauto-attach support
3.9.1 #
- Bumped native Android SDK to
io.linkrunner:android-sdk:3.8.1— token, signature key id, and signature secret key are now encrypted at rest in SharedPreferences using AES-256-GCM with a hardware-backed AndroidKeyStore key (StrongBox when available); legacy plaintext keys from prior versions are wiped atomically on the firstinit()after upgrade
3.9.0 #
- Added
handleDeeplink()method for re-engagement attribution tracking
3.8.0 #
- Added support for Netcore device GUID (netcoreDeviceGuid) field in user data collection
3.7.0 #
- Added eventData parameter to capture payment method to support meta commerce event manager
3.6.3 #
- Added support for Google Analytics Session ID (gaSessionId) field in user data collection
3.6.2 #
- Added support for Meta view through attribution
3.6.1 #
- Upgraded the native android version to fix obfuscation errors due to TypeToken class
3.6.0 #
- Upgraded the native iOS version to support apple search ads attribution
3.5.1 #
- Removed unused dependencies and modules
3.5.0 #
- Added support to pass disableAaid flag to Android SDK
3.4.0 #
- Added support to pass disableIdfa flag to iOS SDK
3.3.0 #
- Added Braze device ID and Google Analytics app instance ID fields to user data collection
3.2.1 #
- Added
setPushToken()function for push notification tracking - Added Android backup configuration files for proper data handling
- Enhanced SDK initialization with platform and version parameters
- Updated native SDK dependencies (iOS LinkrunnerKit to 3.2.0)
- Removed deprecated
getVersion()method - Improved cross-platform consistency and code cleanup
3.0.1 #
- Flutter package for Linkrunner.io