clikgate_flutter 2.1.3
clikgate_flutter: ^2.1.3 copied to clipboard
Clikgate SDK for Flutter: deep links that open the right screen (even after install), install attribution, goals, referrals, identity and Engage (referral links, leaderboards, share) for Android and iOS apps.
2.1.3: Package contact #
- The package contact is now dev@clikgate.com. Code comments tidied. No behaviour change (native SDKs 2.1.3).
2.1.2: Free plan link domain is ciz.ng #
- The Free plan's shared link domain is now
ciz.ng(it wasclk.ng, which Clikgate never put live). Links onciz.ngthat aren't this app's open in the browser, the same asciz.toanddev.ciz.to. Nothing else changes (native SDKs 2.1.2).
2.1.0 (unreleased): Engage is part of the plugin #
- The
clikgate_engagepackage is merged intoclikgate_flutter. Import the Engage features withimport 'package:clikgate_flutter/engage.dart';(same API:ClikgateEngage,ShareApp, models). The share menu channel is registered by this plugin. New dependencies:http,meta.share.systemandshare.whatsAppuse the plugin's own native side (AndroidACTION_SENDchooser /ACTION_VIEW, iOSUIActivityViewController/UIApplication.open), so the plugin does not depend onshare_plusorurl_launcherand apps keep any version of them (same results and errors as before:share_unavailable,whatsApp→ share sheet returningfalse). - Requires the native SDKs 2.1.0 (which contain the native Engage features).
- Automatic push token for uninstall tracking.
Clikgate.configure(automaticPushToken: true)(default) is passed to both native SDKs: when uninstall tracking is on in the dashboard (and tracking and consent allow it) they get a push token without asking for notification permission (iOS registers for remote notifications; Android fetches the FCM token when Firebase Messaging is in the app). On iOS the plugin, already an application delegate, now forwardsapplication(_:didRegisterForRemoteNotificationsWithDeviceToken:)to the native SDK, so apps need no AppDelegate code (no swizzling;firebase_messaginggets the same callback and keeps working). Once Dart passes its own token withsetPushToken, that one wins and the plugin stops forwarding the APNs token. Info.plistClikgateForwardAPNsTokenis no longer needed (still honoured). iOS needs the Push Notifications capability (npx @clikgate/setupadds it).automaticPushToken: falseleaves push registration to the app. - Setup command without Node.js. After
flutter pub add clikgate_flutter, rundart run clikgate_flutter(alsodart run clikgate_flutter:setup) to set Clikgate up, anddart run clikgate_flutter:doctorto check it. It runs the same program asnpx @clikgate/setup(2.1.0): the first run downloads the build for your computer once from thesetup-v2.1.0GitHub release (macOS, Linux and Windows; about 41 MB, up to 55 MB on Linux and Windows), checks the SHA-256 of the download and of the unpacked program against the checksums in this package, and caches it in~/.clikgate/setup/(Windows%LOCALAPPDATA%\clikgate\setup\). Nothing runs if a checksum doesn't match. Its messages and--helpnamedart run clikgate_flutter(anddart run clikgate_flutter:doctor) instead of npx. New dependency:crypto. No change to the plugin's API.
2.1.1 (unreleased): Existing users #
- Existing users. The first
/installnow says how and when the app arrived on the phone, so Clikgate can tell people who had the app before your first release with Clikgate ("existing users, now tracked") from new installs. Existing users are never attributed and don't count as installs; their goals, uninstalls, identify, referrals as referrers and deep links work as before. (native SDKs 2.1.1). - Added:
Clikgate.configure(existingUser:, debugPlatformInstalledAt:),ClikgateAttribution.isExistingUser, andExistingUserException(aClikgateExceptionwith codeexisting_user) fromreferrals.applyCode. - Added (Engage):
referrals.createLinkanswers with the link the native SDK saved for the signed-in customer (offline too) and refreshes it in the background; links are prepared afteridentifyUser()once Engage is used.
2.0.0 (unreleased): one method, goal(); installation ID #
Breaking: track() was removed in favour of goal(). goal() is now the only method for anything that happens in the app; names arrive in the dashboard's "Seen from your app and website" and count once they are ticked. This is the first public release: nothing was published before, so no public version ever had track(). It also carries every unreleased section below.
-
Requires the native SDKs 2.0.0 (Android default dependency and the iOS pod / Swift package constraint).
-
Requires Xcode 26 or newer to build (App Store submissions need the iOS 26 SDK). Devices from iOS 13 are still supported.
-
Removed:
Clikgate.track(...),ClikgateMoneyand thetrackchannel method.goal()is the only method; names count once they are ticked in the dashboard. -
Removed:
enableFirebaseForwarding(mirrorEvents:, eventNameMap:). -
Added:
GoalStatus.received(not_counted_yet,goal_archived): stored, not counted; a success. -
Added (docs):
GoalStatus.refusedwith reasonunknown_goal(a name that isn't set up while the organisation accepts only set-up goals) orgoal_archived: final, never retried. The native SDKs decide and log; the plugin passes the result through. -
Added:
await Clikgate.getInstallationId()(channel methodgetInstallationId), from the native SDKs; null when tracking is off. Guide: https://clikgate.com/docs/identify-users
1.5.1 (unreleased): one tap is one click, X click ids #
Nothing has been published yet: this patch also carries everything under "Unreleased" below.
- Requires the native SDKs 1.5.1 (Android default dependency and the iOS pod / Swift package constraint).
- From the native SDKs: a first-launch link that already matched on
/installis no longer resolved a second time (one tap is one click); opens send the URL and the redirect'scg_click_idunchanged with the installation ID; Xtwclidreaches Clikgate unchanged, likeli_fat_id. Dart tests added. No Dart API change.
Unreleased: one goal() method, Payment goals and enums #
-
Deep link check for "See it live" (test mode and the debug view). From the native SDKs: when a Clikgate deep link is handed to the app, the path it handled is reported (
deeplink_handled), only with a test SDK key or while the dashboard's debug view is open; the query is removed and ID, email and phone segments become:idon the device. Never an app event, never counted. YouronDeepLinkresult is unchanged. No Dart API change. -
Apple Ads token and LinkedIn / Snap click ids. From the native SDKs: on iOS the Apple Ads (AdServices) token is requested when the install is sent (after consent when it is required) and never kept on the device; LinkedIn
li_fat_idand SnapScCidin Clikgate links reach Clikgate unchanged. No Dart API change. -
Password and country-restricted links on app opens. The native SDKs open a password link's page in the system browser (nothing reaches
onDeepLink) and deliver a link blocked for the visitor's country with the newClikgateDeepLink.blockMessage(no path, click or link; show the text, don't route). Channel deep-link map keyblockMessage. -
identifyUser() replaces identify(); goals take a label.
-
Breaking:
identify()is removed.Clikgate.identifyUser(label:, customerId:, identityToken:)takes an optionallabel(what your team sees instead of the click ID; 1-80 characters,""clears it; Growth and up),customerId(leave it out to keep the stored one; null clears it) andidentityToken. With nothing to send it does nothing. -
goal()takeslabeltoo.isFirstis unchanged. -
Private mode: the customer ID and token are dropped on the device as before; labels are sent only when the organisation allows labels in private mode (config
allow_labels), else dropped with one debug warning. Alabel_ignored: "plan"answer logs one debug warning. Channel methodidentifyis nowidentifyUser. -
Breaking:
Clikgate.payment()is removed (and thepaymentchannel method). Report a payment withgoal()on a Payment goal instead:Clikgate.goal('purchase', reference: 'T123456', provider: ClikgateProvider.paystack). Nothing that usedpayment()was released. -
Breaking:
Clikgate.goal()returnsFuture<GoalResult>(wasFuture<void>) and never throws:statusisGoalStatus.counted,waiting(a Payment goal waiting for its confirmation from your payment provider or server) orrefused, with areasoncode; alsogoalKind(GoalKind.standard/GoalKind.payment) andvalueIgnored. An invalid key, value, currency or reference completes asrefusedwith reasoninvalid_argumentinstead of throwing. The future completes once Clikgate has answered (offline, the goal stays queued until it is sent). -
New
providerparameter andClikgateProvider(the payment providers Clikgate knows, plusClikgateProvider.fromString('…')for providers added later; the server checks them). The goal's kind is never sent: it lives in the goal's settings. -
Test mode (a
cg_sdk_test_key): the native SDKs log one line when a goal is waiting for its payment confirmation and when a value was ignored. -
Queueing and retries are unchanged.
1.5.0 (unreleased): consistency fixes #
-
Deep links on every plan, from the native SDKs: in deep-link-only mode (attribution switched off)
goalandtracklog one warning and do nothing; they complete without an error. Afeature_disabledanswer on/eventsor/goalsis dropped and never retried. The "no deferred link" install result at the monthly cap is the normal empty result.isFeatureEnabled('deep_linking')is on by default. -
Requires the native SDKs 1.5.0 (
com.clikgate:clikgate-android:1.5.0,Clikgate ~> 1.5.0). -
New:
const ClikgateMoney.ofMinor(amountMinor, currency), the money helper name used on every platform . The unnamedClikgateMoney(amountMinor, currency)constructor stays as a deprecated alias. -
From the native SDKs:
/installno longer sendstracking_allowed; an opted-out first install sends every consent purposedenied. -
Checked:
pasteboardModedefaults tooff; no trophy, challenge or progress API.
1.4.0 (unreleased): shared-domain browser fallback #
- Requires the native SDKs 1.4.0 (
com.clikgate:clikgate-android:1.4.0,Clikgate ~> 1.4.0). - New:
Clikgate.onBrowserHandoff(Stream<ClikgateBrowserHandoff>,url+host): another organisation's link on a shared domain (ciz.to,ciz.ng,dev.ciz.to) that the native SDK opened in an in-app browser (Custom Tabs / SFSafariViewController) instead of the app.onDeepLinkdoesn't fire for it. Buffered and replayed like deep links. - New
configure(platformDomainBrowserFallback: true)option (false = old behaviour). - Bridge: the handoff travels on the
com.clikgate/deep_linksevent channel as{event: "browserHandoff", url, host};configuresendsplatformDomainBrowserFallback.
1.3.0 (unreleased): goals and private mode #
- Requires the native SDKs 1.3.0 (
com.clikgate:clikgate-android:1.3.0,Clikgate ~> 1.3.0). - New:
Clikgate.goal(key, {value, currency, reference, isFirst}).valueis anint,double,BigIntor numericString, sent over the channel as a decimal string (never a double); NaN, infinity, doubles Dart prints with an exponent and other types throwinvalid_argument(param: value) without a channel call. The native SDKs validate the rest and queue, retry and consent-buffer goals like events. Channel methodgoal. - Private mode (
private_modein/config) is handled by the native SDKs:identifyand event properties / revenue are not sent, goals still are. - Example app: a "Goal: account opened" button.
1.2.0 (unreleased): consent, Google click ids, Firebase forwarding #
- Requires the native SDKs 1.2.0 (
com.clikgate:clikgate-android:1.2.0,Clikgate ~> 1.2.0). - New:
Clikgate.setConsent({analytics, attribution, adUserData, adPersonalization}),getConsent()(ClikgateConsent,ConsentState),setConsentRegion(region)(invalid values throwinvalid_argument),enableFirebaseForwarding({logAttributionEvent, setUserProperties, mirrorEvents, eventNameMap}),attributionMetadata(),enableGoogleOnDeviceMeasurement()(iOS; no-op on Android). - Changed default:
configure(pasteboardMode:)isoff(wasautomatic): the iOS clipboard deferred deep link is opt-in. - Native behaviour (no Dart change needed): consent buffering in consent regions,
gclid/gbraid/wbraidfrom links and the install referrer, minimum-SDK-version policy, Play Integrity standard requests, DeviceCheck on iOS. - Privacy (iOS SDK 1.2.0): the iOS SDK no longer collects the screen size or the jailbreak
heuristics (
is_rooted); seeios/CHANGELOG.md"Privacy" for the exact list. - Example: "Privacy & sales" screen (accept all / necessary only / EEA hint, attribution metadata); Firebase forwarding enabled at start-up. README: "Removing the SDK".
1.1.0 (unreleased): fraud signals #
- Requires the native SDKs 1.1.0 (
com.clikgate:clikgate-android:1.1.0,Clikgate ~> 1.1.0), which send the/installfraud signalsis_emulator/is_rooted(hints, not proof; no new permissions). No Dart API change: the signals are collected natively.
Unreleased #
Connected domains #
- Docs:
linkDomainsshould list every domain of the Clikgate domain group; the native SDKs add the server'slink_domainsand warn about domains missing fromlinkDomains.
Engage split — breaking #
- The core plugin keeps only device responsibilities:
configure,onDeepLink,getAttribution,track,identify,setTrackingEnabled,setPushToken,isClikgateMessage,handleUrl,nativeSdkVersion,isFeatureEnabled,referrals.applyCodeandreferrals.referredBy. - Removed from the core (moved to the new pure-Dart package
clikgate_engage):referrals.createLink,referrals.myStats,referrals.shareToWhatsApp,Clikgate.leaderboards.*,Clikgate.codes.redeemand the modelsReferralLink,ReferralStats,LeaderboardPeriod,LeaderboardPeriodInfo,LeaderboardEntry,LeaderboardPage,MyRank,RedeemedCode,Redemption;ClikgateException.shareUnavailable. - New internal API for
clikgate_engage:Clikgate.getRequestContext()→ClikgateRequestContextandClikgate.reportServerError(code, feature:)(channel methodsgetRequestContext,reportServerError); the removed channel methods are gone from the Android and iOS plugin code. - Public-API snapshot test (
test/api_snapshot.txt) with a check that the core has no Engage API and never depends onclikgate_engage. - Example: two variants (
--dart-define=CLIKGATE_VARIANT=backend|engage).backend(default) gets sign-in with an identity token, invite link, stats, weekly leaderboard / "my rank" and server-side purchases fromsamples/backend;engageusesclikgate_engagefor the same screens plus promo codes. Widget tests for both.
v3 (before the split) #
Clikgate.isFeatureEnabled(key)andClikgateFeatures(feature switches). Calls of a switched-off feature throwClikgateException(feature_disabled)withfeatureset, without a network call.Clikgate.referrals.shareToWhatsApp(WhatsApp, then WhatsApp Business, then the share sheet).- Leaderboards:
Clikgate.leaderboards.top,me,aroundMe,setOptOut; modelsLeaderboardPage,LeaderboardEntry,LeaderboardPeriodInfo,MyRankand theLeaderboardPeriodselector (current,previous,LeaderboardPeriod.key(...)). - Offline / promo codes:
Clikgate.codes.redeemreturningRedemption/RedeemedCode. ClikgateException.featureandClikgateException.offlineTouchId.- Implemented on both platforms: Android over the Android SDK, iOS over the iOS SDK's new
v3 API (
Clikgate.shared.leaderboards,.codes,.referrals.shareToWhatsApp,isFeatureEnabled). On iOS,shareToWhatsAppopenswhatsapp://sendwhen the app listswhatsappinLSApplicationQueriesSchemes, else the share sheet. - Example: weekly leaderboard screen (live refresh, "my rank", around me, opt-out switch), promo-code screen, "Share on WhatsApp".
1.0.0 #
- Initial release over the Clikgate Android SDK 1.0.0 and iOS SDK 1.0.0.
Clikgate.configure,onDeepLink(buffered, replayed to the first subscriber),getAttribution,track,identify,setTrackingEnabled,setPushToken,isClikgateMessage(pure Dart),handleUrl.- Referrals:
createLink,applyCode,myStats,referredBy. - Typed models and
ClikgateException.