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

Official Respectlytics SDK for Flutter - Privacy-first analytics with session-based tracking. No device identifiers, GDPR/ePrivacy compliant, no consent required.

Respectlytics Flutter SDK #

pub package License: Proprietary

Official Respectlytics SDK for Flutter. Privacy-first analytics that respects your users.

Features #

  • πŸ”’ No device identifiers - No IDFA, GAID, or fingerprinting
  • πŸ”„ Automatic session management - Sessions rotate every 2 hours
  • πŸ’Ύ RAM-only storage - Session IDs never written to disk
  • πŸ—‘οΈ Auto-cleanup - Uninstall clears all data
  • πŸ“± Cross-platform - iOS, Android, macOS, Linux, Windows
  • ⚑ Offline-first - Events queue and sync when online
  • πŸ’Ύ Never lose events - Persisted immediately, survives crashes
  • βœ… Designed for GDPR/ePrivacy compliance - Potentially consent-free

Installation #

Add to your pubspec.yaml:

dependencies:
  respectlytics_flutter: ^2.0.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', screen: 'CheckoutScreen');

API Reference #

configure(apiKey:) #

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

track(eventName, {screen}) #

Track an event with optional screen name. 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 is designed to minimize data collection by default. We use anonymized identifiers that are stored only in device memory (RAM) and rotate automatically every two hours or upon app restart. IP addresses are processed transiently for approximate region lookup and immediately discardedβ€”no personal data is ever persisted server-side.

This privacy-by-design architecture avoids persistent device storage and cross-session tracking, significantly reducing compliance complexity compared to traditional analytics. While this approach may reduce or eliminate consent requirements in some jurisdictions, regulations and their interpretation vary. We recommend consulting with your legal team to determine your specific compliance requirements.

What we DON'T collect Why
IDFA / GAID Device advertising IDs can track users across apps
Device fingerprints Can be used to identify users without consent
IP addresses Processed transiently for geolocation, never stored
Custom properties Prevents accidental PII collection
Persistent user IDs Would require consent under ePrivacy Directive
What we DO collect Purpose
Event name Analytics
Screen name Navigation analytics
Session ID (RAM-only) Group events within a session
Platform, OS version Debugging
App version Debugging
Approximate location Country/region only (from IP, never stored)

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 from v1.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.

Why this change? #

Storing identifiers on device (SharedPreferences) requires user consent under ePrivacy Directive Article 5(3). In-memory sessions require no consent, making Respectlytics truly consent-free analytics.

Getting Help #

License #

Proprietary. See LICENSE file.

0
likes
140
points
153
downloads

Publisher

unverified uploader

Weekly Downloads

Official Respectlytics SDK for Flutter - Privacy-first analytics with session-based tracking. No device identifiers, GDPR/ePrivacy compliant, no consent required.

Homepage
Repository (GitHub)
View/report issues

Topics

#analytics #privacy #tracking #flutter-plugin #gdpr

Documentation

API reference

License

unknown (license)

Dependencies

connectivity_plus, flutter, http, package_info_plus, shared_preferences, uuid

More

Packages that depend on respectlytics_flutter