install_referrer_inetkr

Internal Flutter package for tracking app installs via Google Play Store.

๐Ÿ“Œ Supported

  • Android 6 (Marshmallow) and above

๐Ÿš€ Installation

Add the dependency to your pubspec.yaml:

dependencies:
  install_referrer_inetkr: ^0.0.1

๐Ÿ“ฆ Android Setup (Required for JitPack)

Open the file android/build.gradle and inside the allprojects { repositories { ... } } block, add:

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://jitpack.io") } // <~ here
    }
}

Then run:

flutter pub get

โš™๏ธ Initialize SDK

Add the following code to your main.dart:

import 'package:flutter/material.dart';
import 'package:install_referrer_inetkr/install_referrer.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  InstallReferrer.instance.init(); // <~ here

  runApp(const MyApp());
}

๐Ÿงช Testing

  1. Enable debug mode (debug = true) during development.
  2. Run the app on an Android device/emulator.
  3. Open Logcat (Android Studio) or terminal and look for logs starting with the prefix:
[InstallReferrer]

You should see information related to app install and activity status.


๐Ÿ“Š Tracking

  • First-time app installs on a device
  • App activity status: whether the app is active/inactive and since when (feature under development)

๐Ÿ“‚ Development

Clone the repo locally for further development:

git clone https://github.com/inetkr/install_referrer_inetkr.git
cd install_referrer_inetkr
flutter pub get

๐Ÿ”’ License

MIT License