smartlinks_analytics 2.0.2 copy "smartlinks_analytics: ^2.0.2" to clipboard
smartlinks_analytics: ^2.0.2 copied to clipboard

Dart analytics and deep linking API for the SmartLinks Flutter SDK.

smartlinks_analytics #

Analytics, deep linking, dynamic links, promo codes, and in-app purchase verification for the SmartLinks Flutter SDK.

Recommended: import 'package:smartlinks_flutter/smartlinks_flutter.dart' and use SmartLinks.analytics. Full docs: repository README.

Features #

  • Custom event tracking (sendEvent)
  • Deep link handling (getLink, DeepLinkRoute)
  • Short link generation (generateLink)
  • Promo validate / redeem + local premium persistence
  • Apple & Google purchase verification (server-side, with attribution)
  • Anonymous app_user_id

Quick start (umbrella SDK) #

import 'package:smartlinks_flutter/smartlinks_flutter.dart';

await SmartLinks.initialize(apiKey: 'YOUR_KEY');

await SmartLinks.analytics.sendEvent('screen_view', {'screen': 'home'});

await SmartLinks.analytics.getLink((route) {
  print(route.route);
});

Promo & purchases #

final active = await SmartLinks.isPromoActive();

final valid = await SmartLinks.analytics.verifyGooglePurchase(
  productId: 'premium_monthly',
  purchaseToken: tokenFromStore,
);

final appleOk = await SmartLinks.analytics.verifyApplePurchase(
  receipt: receiptFromStore,
);

Standalone (advanced) #

import 'package:smartlinks_analytics/smartlinks_analytics.dart';
import 'package:smartlinks_core/smartlinks_core.dart';

await SmartLinksCore.initialize(apiKey: 'YOUR_KEY');
await SmartLinksAnalytics().initialize(apiKey: 'YOUR_KEY');

Standalone usage still requires smartlinks_core native bridge on mobile.

Platform support #

Platform Support
Android ✅ API 21+
iOS ✅ 11.0+

License #

MIT — see LICENSE.

0
likes
150
points
186
downloads

Documentation

Documentation
API reference

Publisher

verified publishersmartlinks.live

Weekly Downloads

Dart analytics and deep linking API for the SmartLinks Flutter SDK.

Homepage
Repository (GitLab)
View/report issues

License

MIT (license)

Dependencies

flutter, smartlinks_core

More

Packages that depend on smartlinks_analytics