▸Install the Flutter SDK
# pubspec.yaml
dependencies:
flutter:
sdk: flutter
respectlytics_flutter: ^3.0.0
Pure Dart — no platform channels for analytics. Same code on every platform Flutter compiles to (iOS, Android, web, macOS, Windows, Linux). On web, events are sent via the REST API; mobile platforms use the same path.
▸Initialize Respectlytics in Flutter
import 'package:flutter/material.dart';
import 'package:respectlytics_flutter/respectlytics_flutter.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Respectlytics.configure(appKey: '<YOUR_APP_KEY>');
runApp(const MyApp());
}
Initialize in main() after WidgetsFlutterBinding.ensureInitialized() and before runApp(). The future completes immediately on configuration; events queued before completion are flushed once the network is available.
✦Privacy & implementation notes
Apple's review team flags ~3% of apps for incorrectly omitting NSUserTrackingUsageDescription when their SDKs need ATT. The mirror case is also true: adding the key when your code does not call ATTrackingManager is a flag in the other direction. Don't add it on Respectlytics's account.
Most teams arriving here are migrating from a Firebase-style integration where IDFA was collected with consent. The simplification is not just removing the field — it's removing the consent UX, the privacy label tier, the conditional analytics paths in code, and the legal-team follow-up question "what do we do with the data?". Respectlytics's answer is: there is no IDFA, so there's nothing to do.
The Flutter SDK is pure Dart. No MethodChannel, no platform-specific iOS or Android plugin code. The same code runs on every platform Flutter supports — including web and desktop targets. This eliminates one common audit surface ("what's the Android implementation doing?").
Always initialize after WidgetsFlutterBinding.ensureInitialized() and before runApp(). If you skip the binding step, the configure call will throw on platforms that need a binding for asynchronous I/O. The SDK documentation example uses this pattern by default.
⇋How this compares to other analytics SDKs
| IDFA handling | Firebase Analytics | Mixpanel | AppsFlyer | Respectlytics |
|---|---|---|---|---|
| Calls ATTrackingManager | Yes (with consent) | Yes (optional) | Yes (mandatory) | No |
| Stores IDFA in events | Yes (when consented) | Optional | Yes | Never |
| Re-requests IDFA after restart | Yes | Yes | Yes | N/A |
| Behavior when consent denied | IDFA absent | IDFA absent | Limited tracking | Identical (no IDFA path) |
| App Store Privacy Label impact | Triggers "Identifiers" tier | Triggers "Identifiers" | Triggers "Identifiers" | No "Identifiers" entry from us |
❓Frequently asked questions
How do we measure unique users without IDFA?
By session, not by user. Respectlytics's session_id rotates every two hours and on app restart, so unique-session counts (not unique-user counts) are what surface in dashboards. For most product decisions — funnel rates, feature reach, release deltas — sessions are the right unit. Per-user counts for billing or financial reporting live in your account system, not your analytics pipeline.
Do we still need an `NSUserTrackingUsageDescription` Info.plist key?
No — and you should NOT add one for Respectlytics. The presence of that key implies your app tracks across other apps and websites, which Apple interprets as a signal even if your code never calls ATTrackingManager.requestTrackingAuthorization. Add the key only if another SDK in your app legitimately needs it.
Will Respectlytics ever collect IDFA in a future version?
No. The 5-field event schema is enforced at the API boundary — additions would be a versioned breaking change with explicit migration. The privacy posture is architectural, not policy-level.
What about IDFV (vendor identifier) — is that collected?
Also no. The SDK does not read UIDevice.current.identifierForVendor. Session-scoped analytics doesn't need a per-device or per-vendor identifier — the session_id is sufficient for funnel grouping and rotates before any cross-day tracking would emerge.