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');
Self-hosting? Point to your own server: await Respectlytics.configure(apiKey: 'key', baseUrl: 'https://your-server.com') Β· Learn more
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: ^3.0.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? βΌ
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.
β’In-depth guides for Flutter
Per-property guides for the Flutter SDK β no IDFA, no AAID, RAM-only event queue, EU data residency, and more.
- How to add Flutter analytics with no IDFA collection Add analytics to a Flutter app without collecting Apple's IDFA. Helps developers avoid collecting personal data in the β¦
- How to add Flutter analytics with no AAID collection Add analytics to a Flutter app without collecting Google's AAID. No AD_ID permission. Privacy-by-architecture.
- How to add Flutter analytics with no ATT prompt Add analytics to a Flutter iOS app without showing the App Tracking Transparency prompt. No NSUserTrackingUsageDescriptβ¦
- How to add Flutter analytics with no third-party trackers Add analytics to a Flutter app without any third-party tracker dependencies in your supply chain.
- How to add Flutter analytics with zero device storage Add analytics to a Flutter app without writing a single byte to disk. RAM-only event queue.
- How Flutter analytics works with a RAM-only event queue Flutter analytics events are held in memory only β flushed every 30 seconds, lost on force-quit by design.
- How to add Flutter analytics with a 5-field event schema Add analytics to a Flutter app where every event stores only 5 fields. Extra fields are rejected at the API.
- How Flutter analytics handles geolocation (country only) Flutter analytics with country-level geolocation only. IPs are processed transiently for country lookup, then discarded.
β’How to track common events in Flutter
Privacy-first tracking patterns for the events that matter most in Flutter apps.
- How to track paywall conversion in Flutter without personal data A privacy-first pattern for tracking paywall conversion in Flutter apps with Respectlytics. No IDFA, no AAID, no user Iβ¦
- How to track onboarding completion in Flutter without personal data Track onboarding completion in Flutter using Respectlytics's 5-field event schema. Helps developers avoid collecting peβ¦
- How to track sign-up events in Flutter without personal data Track account creation in Flutter apps with Respectlytics. No user_id, no email, no signup method as metadata. Helps deβ¦
- How to track push notification opt-in in Flutter without personal data Track when Flutter users grant push notification permission. Privacy-first pattern with Respectlytics β no device tokenβ¦
- How to track paywall views in Flutter without personal data Track paywall impressions in Flutter apps with Respectlytics. Session-scoped reach, no per-user attribution, no PII.
- How to track trial-start events in Flutter without personal data Track trial activation in Flutter apps with Respectlytics. No user_id, no email, no payment-method metadata. Session-scβ¦
- How to track trial-to-paid conversion in Flutter without personal data Track trial-to-paid conversion in Flutter apps with Respectlytics. Session-scoped event, no transaction IDs, no user IDβ¦
- How to track subscription renewals in Flutter without personal data Track subscription renewals in Flutter apps with Respectlytics. Session-scoped retention signal, no MRR mixing, no per-β¦