Privacy-First Analytics
for Flutter
Add analytics to your Flutter app in 2 lines of code. No IDFA, no GAID, no device fingerprints. Works on iOS, Android, macOS, Linux, and Windows.
import 'package:respectlytics_flutter/respectlytics_flutter.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// 1. Configure once at launch
await Respectlytics.configure(
apiKey: 'your-api-key'
);
runApp(const MyApp());
}
// 2. Track events anywhere
await Respectlytics.track('purchase_completed');
Installation
Add the SDK to your Flutter project in seconds
Option 1: Using Flutter CLI
flutter pub add respectlytics_flutter
Option 2: Add to pubspec.yaml
dependencies:
respectlytics_flutter: ^2.1.0
Then run flutter pub get
Requirements
Why Respectlytics for Flutter?
Unlike Firebase Analytics, we help you avoid collecting data you don't need
Firebase Analytics
firebase_analytics package
- β οΈ Collects IDFA/GAID by default
- β οΈ Stores IP addresses
- β οΈ Unlimited custom parameters (PII risk)
- β οΈ Persistent user_id tracking
- π App Set ID for cross-app tracking
Respectlytics
respectlytics_flutter package
- β No IDFA, GAID, or device fingerprints
- β IP processed transiently, never stored
- β 5 fields only (API rejects extras)
- β Session-based with 2-hour rotation
- π‘οΈ RAM-only session storage
API Reference
Simple by design. Just 3 methods.
| Method | Description |
|---|---|
configure({required String apiKey})
|
Initialize the SDK. Call once in main() before runApp()
|
track(String eventName)
|
Track an event. Custom properties not supported (by design) |
flush()
|
Force send queued events. Rarely neededβSDK auto-flushes every 30s |
Full Example
A complete Flutter app with analytics integration
import 'package:flutter/material.dart';
import 'package:respectlytics_flutter/respectlytics_flutter.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Respectlytics.configure(apiKey: 'your-api-key');
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('My App')),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ElevatedButton(
onPressed: () async {
await Respectlytics.track('signup_started');
},
child: const Text('Sign Up'),
),
const SizedBox(height: 16),
ElevatedButton(
onPressed: () async {
await Respectlytics.track('purchase_completed');
},
child: const Text('Purchase'),
),
],
),
),
),
);
}
}
Platform Support
One SDK, five platforms
Privacy Architecture
Transparent about exactly what data is collected
β What We Store (5 fields)
-
event_nameThe action being tracked -
timestampWhen it happened -
session_idRAM-only, 2-hour rotation -
platformiOS, Android, macOS, etc.
Country is derived server-side from IP, then IP is immediately discarded.
β What We DON'T Collect
-
β
IDFA / GAID
Device advertising IDs
-
β
IP addresses
Processed transiently only
-
β
Device fingerprints
No hardware identifiers
-
β
Custom properties
API rejects extra fields
Our motto is Return of Avoidance (ROA) β the best way to protect sensitive data is to never collect it. Consult your legal team to determine your specific requirements.
Frequently Asked Questions
Does the SDK collect IDFA or GAID? βΌ
How do I migrate from Firebase Analytics? βΌ
FirebaseAnalytics.logEvent() calls with
Respectlytics.track().
Remove any setUserId() calls β Respectlytics uses automatic session-based tracking.
See our migration guide for details.
Does it work offline? βΌ
track() call,
surviving force-quit, crashes, and app termination. They are sent when connectivity is restored.
Why can't I send custom properties? βΌ
Does this SDK work with Expo? βΌ
Other SDKs: Swift β’ React Native β’ Kotlin β’ Full Documentation
Ready to Add Analytics?
Get started in under 5 minutes. No credit card required.