broughtby_flutter library
Broughtby — referral tracking SDK for mobile apps.
await BroughtBy.initialize(publicKey: 'bt_pk_...');
await BroughtBy.identify(jwt: supabaseAccessToken);
await BroughtBy.captureAttribution();
Classes
- AffiliateInfo
- An affiliate's own code and share link.
- AttributionResult
- BroughtBy
- Broughtby SDK.
- BroughtByApiClient
- The Broughtby API client.
- BroughtByDashboardPage
- The webview page that shows the dashboard.
-
BroughtByFailure<
T> -
BroughtByOk<
T> -
BroughtByResult<
T> - A result carrying either success or failure.
- ClipboardSource
- Clipboard.
- DeepLinkSource
- Universal Link / App Link.
- InstallReferrerSource
- Google Play Install Referrer.
- ReferralCodeSource
- The channels a code can arrive through.
Enums
- AttributionSource
- The channel attribution was captured through.
- AttributionStatus
- The outcome of an attribution attempt.
- BroughtByErrorKind
- SDK errors.
Functions
-
extractCodeFromClipboard(
String? clipboard) → String? - Treats clipboard content as a possible code.
-
extractCodeFromInstallReferrer(
String? referrer) → String? - Extracts the code from a Play Store install referrer string.
-
extractCodeFromLink(
Uri? link) → String? - Extracts the code from a universal / app link.
-
looksLikeReferralCode(
String candidate) → bool - Says whether a code is plausible in shape.
-
normalizeReferralCode(
String input) → String - Collapses whatever variation the user typed into one canonical code.