katyayani_core 2.0.4
katyayani_core: ^2.0.4 copied to clipboard
All-in-one customer engagement SDK for Flutter — event & ecommerce analytics, install/referral attribution (MMP), rich push (sticky & timer) and in-app nudges.
2.0.4 #
- Widen
connectivity_plusconstraint to>=6.1.0 <8.0.0(supports v7) for wider app compatibility. No API changes.
2.0.3 #
- Crash-safety: Firebase init can never crash your app.
KatyayaniCore.init()now wrapsFirebase.initializeApp()— if Firebase is missing or misconfigured (andenablePushis on by default), push is silently disabled and the rest of the SDK (events, attribution, nudges) keeps working. An SDK/backend problem will never take down the host app.
2.0.2 #
- "Request via form" is now a real form. The API‑key request link points to a hosted form; submissions land directly in the team's admin inbox. Docs‑only change.
2.0.1 #
- Docs & discoverability. Rewritten pub.dev page: clearer "what is this" intro, comparison with Netcore/Pushwoosh, every key‑event explained with steps, API‑key request (support@katyayaniorganics.com with a prefilled email link). Added
topics:+ a keyword‑rich description for search. Removed the internal folder‑structure section. No code changes.
2.0.0 #
- BREAKING — strongly-typed ecommerce key-events. All ecommerce methods now take named parameters instead of a raw
Mappayload, and line items are the newKCItemclass.KCItem(sku, qty, rate, {name, category, subCategory, otherCategories, extra})—sku/qty/rateare required;otherCategoriesexpands toother_category_1..n;extraaccepts any additional fields.- Methods:
viewItem/addToCart/removeFromCart/viewCart/beginCheckout(coupon)/addPaymentInfo(paymentType)/purchase(transactionId, tax, shipping, coupon)/refund(transactionId)— each takes{required List<KCItem> items, num? value, String currency = 'INR', ..., Map<String,dynamic>? params}.valueauto-computes from items (Σ qty*rate) if omitted.paramsaccepts any custom key-values, stored verbatim. - New engagement key-events:
search(searchTerm),signUp(method),login(method)— all with named params +params. - Migration:
purchase({'transaction_id':'X','value':1497,'items':[...]})→purchase(transactionId:'X', value:1497, items:[KCItem(sku:'..', qty:2, rate:499)]).
1.10.0 #
- Referral sharing (referral attribution) — new
KatyayaniCore.generateReferralLink(referralCode, {referrerId, deepLinkPath, params, androidStoreUrl, iosStoreUrl, webUrl})creates a shareable smart link for the current user's own referral code. When a new user installs via that link,KatyayaniCore.onReferral((code, params) { ... })fires with the referral code so you can auto-fill the referral field and credit the referrer. CallKatyayaniCore.confirmReferral(code, {referrerId})after signup to tie the referral to the referee's real userId. The backend records who referred whom (referrer ↔ referee).
1.9.0 #
- Standard ecommerce events (GA4-aligned) — convenience methods
viewItem,addToCart,removeFromCart,viewCart,beginCheckout,addPaymentInfo,purchase,refund. Pass a GA4-shape payload ({ currency, value, transaction_id, items: [{ item_id, item_name, price, quantity, ... }] }) and the dashboard auto-computes funnel, revenue, conversion, and product-wise analytics.
1.8.0 #
- Attribution & revenue tracking (MMP) — new
KatyayaniCore.capturePayment(amount, {currency, orderId, properties})attributes revenue to the user's acquisition source (platform-wise revenue / ROAS in the dashboard). - Deferred deep linking — on first open after install, the SDK reads the Android Play Store install referrer and resolves the originating smart link, then fires
KatyayaniCore.onDeferredDeepLink((route, attribution) { ... })so you can route the user to the campaign's target page. - Install attribution — automatic on init; matches the click that drove the install (referrer code or device fingerprint). Survives uninstall→reinstall.
- Added
KatyayaniCore.trackAttribution(type, {properties})for funnel events (e.g. signup). - New dependency:
android_play_install_referrer(Android-only, runtime-guarded).
1.7.0 #
- Fix crash on FCM messages —
KCNotification.fromJsonnow safely coerces FCM data (which arrives as all-strings):buttons/dataJSON-decoded, booleans/ints/empty-strings handled. Previously threwtype 'String' is not a subtype of 'List'and the notification didn't render. This also lets the SDK honor the customchannelId(custom tone) on foreground messages.
1.6.0 #
- Custom notification sound — new
KatyayaniCore.createSoundChannel(id, name, soundResource)creates an Android channel with a custom raw sound (put the file atandroid/app/src/main/res/raw/<soundResource>.mp3). Send notifications with that channelId to play the tone (Android 8+ ties sound to the channel).
1.5.0 #
- Sticky/timer notifications now render in the background — the background FCM handler builds the ongoing (sticky) notification via flutter_local_notifications, so data-only push messages show correctly even when the app is backgrounded (the OS tray can't display "sticky").
1.4.0 #
- Upgrade
firebase_messagingto^16.3.0andfirebase_coreto^4.0.0— resolves dependency conflicts with apps on the latest Firebase SDKs.
1.3.0 #
- Push tokens register on startup — the FCM token is now registered with the backend on
init()(for anonymous and identified users), not only when a user is already identified. So devices are reachable as soon as the app launches (requiresenablePush: true). - FCM topics support — new
KatyayaniCore.subscribeToTopic(topic)/unsubscribeFromTopic(topic)for broadcast / group notifications. - Uses
flutter_local_notifications: ^21.0.0(named-parameter API), Dart >=3.10.0, Flutter >=3.38.1 — resolves dependency conflicts with apps on the latest version.
1.3.0 #
- Push tokens: FCM token is now registered with the backend on startup (when
enablePushis true) — for anonymous users too, not just identified ones. Token fetch works without notification permission, so the backend can always reach the device. - FCM topics: new
KatyayaniCore.subscribeToTopic(topic)andKatyayaniCore.unsubscribeFromTopic(topic)for broadcast/group notifications. - Upgrade
flutter_local_notificationsto^21.0.0(was^18.0.0) — resolves dependency conflicts with apps on the latest version. - Migrate push notification code to the v21 named-parameter API (
initialize,show,cancel). - Minimum requirements: Dart >=3.10.0 and Flutter >=3.38.1 (required by flutter_local_notifications 21).
1.1.0 #
- API key validation on SDK init — SDK verifies key via
/v1/sdk/config/:siteIdbefore enabling tracking - Guard all public methods (
track,screenView,identify,flushEvents) — no-op if key validation failed - Invalid or revoked keys result in silent no-op instead of sending unauthenticated data
1.0.0 #
- Initial release
- Event tracking with batching, persistence, and retry
- Push notifications (standard, sticky, timer)
- In-app nudges with navigation callbacks
- Automatic screen view tracking via
KCNavigationObserver - User identity management (identify / reset)
- Session management with configurable timeout
- Offline event persistence and flush-on-reconnect
enablePushflag for apps that handle push independently