respectlytics_flutter 2.1.0 copy "respectlytics_flutter: ^2.1.0" to clipboard
respectlytics_flutter: ^2.1.0 copied to clipboard

Official Respectlytics SDK for Flutter - Privacy-first analytics with session-based tracking. No device identifiers, transparent data collection.

Respectlytics Flutter SDK #

Official Respectlytics SDK for Flutter. Privacy-first analytics with automatic session management, offline support, and zero device identifier collection.

pub version Platform License

Installation #

Add to your pubspec.yaml:

dependencies:
  respectlytics_flutter: ^2.1.0

Or run:

flutter pub add respectlytics_flutter

Quick Start #

import 'package:flutter/material.dart';
import 'package:respectlytics_flutter/respectlytics_flutter.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // 1. Configure (call once at app launch)
  await Respectlytics.configure(apiKey: 'your-api-key');

  runApp(MyApp());
}

// 2. Track events anywhere in your app
await Respectlytics.track('purchase');

API Reference #

configure(apiKey:) #

Initialize the SDK. Call once in your main() before runApp().

track(eventName) #

Track an event. Custom properties are not supported (privacy by design).

flush() #

Force send queued events. Rarely needed - SDK auto-flushes every 30 seconds.

πŸ”„ Automatic Session Management #

Session IDs are managed entirely by the SDK - no configuration needed.

Scenario Behavior
App starts fresh New session ID generated
App killed & restarted New session ID (regardless of time)
App in foreground 2+ hours Session ID rotates automatically
App in background 2+ hours Session ID rotates on next track() call

Key points:

  • πŸ”„ New session on every app launch
  • ⏱️ Sessions rotate after 2 hours of continuous use
  • πŸ’Ύ Session IDs stored in RAM only (never persisted to disk)
  • 🚫 No cross-session tracking - each session is independent

πŸ›‘οΈ Privacy by Design #

Respectlytics helps developers avoid collecting personal data in the first place. Our motto is Return of Avoidance (ROA) β€” the best way to protect sensitive data is to never collect it.

What We Store (4 fields only) #

Field Purpose
event_name The action being tracked
timestamp When it happened
session_id Groups events in a session (RAM-only, 2-hour rotation, hashed server-side)
platform iOS, Android, macOS, Linux, Windows

Country is derived server-side from IP address, then the IP is immediately discarded.

What We DON'T Collect #

Data Why Not
IDFA / GAID Device advertising IDs enable cross-app tracking
IP addresses Processed transiently for country lookup, never stored
Device fingerprints Can be used to identify individuals
Custom properties API rejects extra fields to prevent accidental PII
Persistent user IDs No cross-session tracking by design

Privacy Architecture #

  • RAM-only sessions: Session IDs exist only in device memory, never written to disk
  • 2-hour rotation: Sessions automatically expire and regenerate
  • New session on restart: Each app launch starts a fresh session
  • Server-side hashing: Session IDs are hashed with daily-rotating salt before storage
  • Strict allowlist: API rejects any fields not on the 4-field allowlist
  • Open source SDKs: Full transparency into what data is collected

This architecture is designed to be transparent (you know exactly what's collected), defensible (minimal data surface), and clear (explicit reasoning for each field).

Consult your legal team to determine your specific compliance requirements.

Event Queue Behavior #

Events are queued and sent automatically:

  • Every 30 seconds
  • When 10 events are queued
  • When app goes to background
  • When flush() is called

Events are NEVER lost: They are persisted to SharedPreferences immediately on every track() call, surviving force-quit, crashes, and app termination.

Platform Support #

Platform Supported
iOS βœ…
Android βœ…
macOS βœ…
Linux βœ…
Windows βœ…
Web ❌

Requirements #

  • Flutter 3.10+
  • Dart 3.0+

Migration Guide #

From v2.0.x to v2.1.0 #

Breaking Change: The screen parameter has been removed from track().

- await Respectlytics.track('purchase', screen: 'CheckoutScreen');
+ await Respectlytics.track('purchase');

If you need screen context, include it in your event name (e.g., checkout_screen_purchase).

From v1.x to v2.x #

⚠️ Breaking Changes:

  • REMOVED: identify() method - no longer needed
  • REMOVED: reset() method - no longer needed
  • REMOVED: SharedPreferences storage for user IDs

What to do:

  1. Remove any calls to Respectlytics.identify()
  2. Remove any calls to Respectlytics.reset()
  3. That's it! Session management is now automatic.

Getting Help #

License #

Proprietary. See LICENSE file.

0
likes
150
points
298
downloads

Publisher

unverified uploader

Weekly Downloads

Official Respectlytics SDK for Flutter - Privacy-first analytics with session-based tracking. No device identifiers, transparent data collection.

Homepage
Repository (GitHub)
View/report issues

Topics

#analytics #privacy #tracking #flutter-plugin

Documentation

API reference

License

unknown (license)

Dependencies

connectivity_plus, flutter, http, shared_preferences, uuid

More

Packages that depend on respectlytics_flutter