Skip to content
trackd.one

Apps

Flutter

Analytics for Flutter apps and games on Android, iOS, macOS, Windows, Linux and web. Only dependency — the http package.

Overview

  • No device identifiers, no advertising ids, no device model, no fingerprinting.
  • Nothing is written to disk. Events and the session id live in memory only.
  • Batched delivery with automatic retry and a neutral User-Agent: trackd-flutter/<version>.

Requirements: Flutter 3.10+ (Dart 3.0+).

Install

The pub.dev package is coming. Until then download trackd.dart to lib/trackd.dart and add http:

dependencies:
  http: ^1.2.0

Android: release builds need the internet permission in android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />

macOS: add com.apple.security.network.client to both DebugProfile.entitlements and Release.entitlements. Web: the app must be served from the registered domain.

Setup

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'trackd.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  Trackd.init(websiteId: 'YOUR_WEBSITE_ID', appVersion: '1.2.0', debug: kDebugMode);
  runApp(MaterialApp(
    navigatorObservers: [TrackdNavigatorObserver()],   // automatic screen tracking
    routes: {'/': (_) => const HomePage()},
  ));
}

API

Trackd.screen('Home');
Trackd.event('signup', {'plan': 'pro', 'trial': true});
Trackd.revenue(4.99, currency: 'EUR', orderId: 'order-123');  // → event "purchase"
await Trackd.flush();
Trackd.setEnabled(false);                               // opt-out: stop + clear queue

Screen tracking

TrackdNavigatorObserver tracks every named page route. Map routes with parameters to generic names — never send user data:

TrackdNavigatorObserver(
  nameExtractor: (settings) => settings.name?.replaceAll(RegExp(r'/\d+'), '/:id'),
)

go_router: GoRouter(observers: [TrackdNavigatorObserver()], …) with named GoRoutes.

Store privacy forms

Google Play: App interactions + Approximate location, analytics, not shared, no device IDs. App Store: Product Interaction + Coarse Location, not linked, no tracking.

Ready in minutes

Create a free account, add your website or app, copy the snippet.

Start for free