Apprvd.app

Quickstart

From an empty workspace to your app's first tracked event.

1. Get into a workspace

During early access Apprvd.app is invite only: ask for access. Once a workspace has invited your address, sign in at platform.apprvd.app with Google, using that address, and choose Join. Teammates you invite from Team join the same way.

When sign-up opens, a new account goes through onboarding instead: your company, your goals, connecting Firebase and your first app, which covers step 2.

2. Add your app

On the Applications page, Connect Google account with the Google account that can see the app's Firebase project. Then Add app, at the top of the sidebar, and pick the project. One app is one Firebase project.

That's all the dashboard needs: users, retention, funnels and releases come from the project's Google Analytics property, with no code. If Apprvd.app says Analytics isn't linked, see Firebase and Google Analytics.

3. Get the write key

On the app's Data sources page, connect the Apprvd.app tracker. It makes a write key, pk_…, and shows the ingest URL next to it. The key can only send events into this one app, so it is safe to ship inside the binary.

4. Install the SDK and send an event

Pick your platform. The choice carries to every code block in the docs.

pubspec.yaml
dependencies:
  apprvd_tracker: ^0.7.0
  # if the app doesn't have them yet: the version and the stored device id below
  package_info_plus: ^8.0.0
  shared_preferences: ^2.0.0
lib/main.dart
import 'dart:math';
import 'package:apprvd_tracker/apprvd_tracker.dart';
import 'package:flutter/foundation.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:shared_preferences/shared_preferences.dart';

/// A stable id for this install, generated once and kept on disk.
/// Without it the tracker generates a fresh id every launch and your unique
/// counts inflate by roughly the number of sessions per user.
Future<String> apprvdDeviceId() async {
  final prefs = await SharedPreferences.getInstance();
  var id = prefs.getString('apprvd_device_id');
  if (id == null) {
    // 128 random bits as hex; also safe on web, where ints are 32-bit
    final r = Random.secure();
    id = List.generate(16, (_) => r.nextInt(256).toRadixString(16).padLeft(2, '0')).join();
    await prefs.setString('apprvd_device_id', id);
  }
  return id;
}

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(); // as the app already does
  Apprvd.init(
    writeKey: 'pk_…', // Data sources → connect the Apprvd.app tracker
    endpoint: 'https://platform.apprvd.app/api/ingest',
    deviceId: await apprvdDeviceId(),
    // which release each event came from, so Apprvd.app can tell when a new
    // version stops sending one
    platform: kIsWeb ? 'web' : defaultTargetPlatform.name.toLowerCase(),
    appVersion: (await PackageInfo.fromPlatform()).version,
  );
  // The id Google Analytics knows this install by, so a deletion request in
  // Apprvd.app can name the GA4 user too. Not awaited: it would delay the first frame.
  FirebaseAnalytics.instance.appInstanceId.then(Apprvd.setAppInstanceId);
  // don't lose the last batch when the app goes to the background
  AppLifecycleListener(onPause: Apprvd.flush);
  runApp(const App());
}

// anywhere:
Apprvd.track('lesson_completed', {'lesson': 'intro', 'score': 87});

5. Check it arrived

  • Run the app. Events batch for up to ten seconds, then send. On the Guide, Setup status shows Event tracking (SDK): receiving events.
  • The KPIs page lists every tracker event by name from the next day: tracker figures refresh within minutes but count complete days only. Pin one to make it a tile.

Next