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
- Enable debug mode (
debug = true) during development. - Run the app on an Android device/emulator.
- 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