搜尋套件、儲存庫與 APP 分類

套件詳情v1.2.1

install_referrer

檢測您的應用程式是從哪裡安裝的(Google Play、App Store、TestFlight…)

AndroidiOS
近 30 天下載
1450
喜歡數
72
Pub 分數
140

安裝套件

flutter pub add install_referrer

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

install_referrer 套件讓 Flutter 應用程式能夠偵測安裝來源,例如 Google Play、App Store 或 TestFlight。它提供簡單的 API,可在應用程式啟動時取得推薦資訊,協助開發者追蹤行銷活動與使用者來源。相容於 Android 與 iOS,透過外掛介面利用原生平台功能。此套件對於行動應用程式的分析、歸因與活動追蹤非常實用。

適用情境

  • 追蹤使用者取得來源
  • 分析行銷活動表現
  • 與分析平台整合
  • 將安裝歸因於特定廣告
  • 支援推薦計畫

主要特色

  • 跨平台支援(Android 與 iOS)
  • 用於取得推薦來源的簡單 API
  • 透過平台通道實現原生整合
  • 輕量且依賴極少
  • 安全的資料處理

適合對象

  • 行銷分析團隊
  • 行動應用程式開發人員
  • 活動追蹤系統
  • 推薦與激勵計畫
  • 需要安裝歸因的應用程式

使用建議

  • 兩個平台都需要正確設定
  • 僅限初始安裝推薦人
  • 依賴於平台特定的實作
  • 在所有測試環境中可能無法正常運作
  • 資料可用性取決於廣告網路和商店政策

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

install_referrer

Pub

A Flutter plugin that allows you to detect how your application was installed.

Supported platforms

  • Android: ✅
  • iOS: ✅

Feel free to open a PR to support new platforms.

Installation

  1. Add install_referrer: ^1.2.1 to your pubspec.yaml file.
  2. Import import 'package:install_referrer/install_referrer.dart';
  3. Get the value by invoking the Future InstallReferrer.referrer

Possibles values

Android
Store Value
Google Play InstallationAppReferrer.androidGooglePlay
Amazon App Store InstallationAppReferrer.androidAmazonAppStore
Huawei App Gallery InstallationAppReferrer.androidHuaweiAppGallery
Oppo App Market InstallationAppReferrer.androidOppoAppMarket
Samsung App Shop InstallationAppReferrer.androidSamsungAppShop
Vivo App Store InstallationAppReferrer.androidVivoAppStore
Xiaomi App Store InstallationAppReferrer.androidXiaomiAppStore
Others InstallationAppReferrer.androidManually

If the application was installed from a third party app (eg: GMail, Google Drive, Chrome…), it will be considered as a manual installation (InstallationAppReferrer.androidManually).

If the application was installed from a store (FDroid, Amazon App Shop…) which was not preinstalled on the device (a "non-system" app), it will also be considered as a manual installation (InstallationAppReferrer.androidManually).

If the Android application is in debug mode, it will be marked as InstallationAppReferrer.androidDebug.

iOS
Store Value
App Store InstallationAppReferrer.iosAppStore
Test Flight InstallationAppReferrer.iosTestFlight

If the iOS application is in debug mode (eg: from the simulator), it will be marked as InstallationAppReferrer.iosDebug.

Package name

You can also get the package name (Android) or app id (iOS), by calling instead InstallReferrer.app

Widgets

If you want to receive the result directly in a Widget, you have two choices: InstallReferrerDetectorListener and InstallReferrerDetectorBuilder :

InstallReferrerDetectorBuilder(
  builder: (BuildContext context, InstallationApp? app) {
    if (app == null) {
      return const CircularProgressIndicator.adaptive();
    } else {
      return Text(
        'Package name:\n${app.packageName ?? 'Unknown'}\n'
        'Referrer:\n${referrerToReadableString(app.referrer)}',
          textAlign: TextAlign.center,
      );
    }
  },
);
InstallReferrerDetectorListener(
  child: YourWidget(),
    onReferrerAvailable: (InstallationApp? app) {
      // TODO
    },
);

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。