Respectlytics Respect lytics
Menu
Flutter SDK v2.1.0

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.

main.dart
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');
2 lines
to integrate
5 fields
stored only
5 platforms
supported
0 device IDs
collected

Installation

Add the SDK to your Flutter project in seconds

Option 1: Using Flutter CLI

Terminal
flutter pub add respectlytics_flutter

Option 2: Add to pubspec.yaml

pubspec.yaml
dependencies:
  respectlytics_flutter: ^2.1.0

Then run flutter pub get

Requirements

βœ“ Flutter 3.10+
βœ“ Dart 3.0+

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

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

lib/main.dart
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

🍎
iOS
βœ“
πŸ€–
Android
βœ“
πŸ’»
macOS
βœ“
🐧
Linux
βœ“
πŸͺŸ
Windows
βœ“
🌐
Web
β€”

Privacy Architecture

Transparent about exactly what data is collected

βœ“ What We Store (5 fields)

  • event_name The action being tracked
  • timestamp When it happened
  • session_id RAM-only, 2-hour rotation
  • platform iOS, 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? β–Ό
No. The Respectlytics Flutter SDK never collects IDFA, GAID, device fingerprints, or any persistent identifiers. Session IDs are stored only in RAM and rotate every 2 hours or on app restart.
How do I migrate from Firebase Analytics? β–Ό
Replace your 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? β–Ό
Yes. Events are persisted to SharedPreferences immediately on every track() call, surviving force-quit, crashes, and app termination. They are sent when connectivity is restored.
Why can't I send custom properties? β–Ό
By design. Custom properties are the #1 source of accidental PII leaks in analytics. Our API rejects any fields not on the strict 4-field allowlist, making it technically difficult to accidentally collect data you don't need. Read why we killed custom properties.
Does this SDK work with Expo? β–Ό
This SDK is for Flutter/Dart projects. For React Native or Expo projects, use the respectlytics-react-native package instead.

Other SDKs: Swift β€’ React Native β€’ Kotlin β€’ Full Documentation

Ready to Add Analytics?

Get started in under 5 minutes. No credit card required.