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

套件詳情v1.1.0

matomo

適用於 Flutter 的跨平台 Matomo 追蹤,使用 Matomo API 並以純 Dart 編寫。

AndroidiOS
近 30 天下載
383
喜歡數
30
Pub 分數
130

安裝套件

flutter pub add matomo

套件介紹

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

一個跨平台的 Flutter 套件,用於將 Matomo 分析整合到行動應用程式中,透過 Matomo API 實現事件追蹤與使用者行為監控。完全以 Dart 編寫,支援 Android 與 iOS 平台,為開發者提供輕量且高效能的解決方案,無需原生程式碼即可實現注重隱私的分析功能。該套件簡化了與 Matomo 伺服器端追蹤基礎設施的整合,確保跨裝置資料收集的一致性。

適用情境

  • 在移動應用中追蹤用戶互動
  • 監控應用程式效能和參與度
  • 收集自定事件和目標
  • 與現有的 Matomo 分析儀表板整合
  • 支援符合GDPR的資料收集

主要特色

  • 純 Dart 實現
  • 跨平台支援(Android 與 iOS)
  • Matomo API 相容性
  • 事件和目標追蹤
  • 輕量且易於整合

適合對象

  • 使用 Matomo 分析的 Flutter 開發人員
  • 需要注重隱私的追蹤的應用程式
  • 需要跨平台一致分析的項目
  • 透過 Matomo 伺服器管理分析的團隊
  • 開發人員避免使用原生平台特定程式碼

使用建議

  • 需要一個正在運行的 Matomo 實例
  • 僅限 Matomo 特定功能
  • 該包中沒有即時儀表板
  • 取決於 Matomo API 的可用性與設定
  • 手動設定以用於進階追蹤情境

原始 README

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

matomo

A Dart Client for Matomo. This is completely written in Dart and works cross-platform, including web.

Getting Started

dependencies:
    matomo: ^1.1.0

As early as possible in your application, you need to configure the Matomo Tracker to pass the URL endpoint of your instance and your Site ID.

    await MatomoTracker().initialize(
        siteId: siteId,
        url: 'https://example.com/piwik.php',
    );

If you need to use your own Visitor ID, you can pass it at the initialization of MatomoTracker as is:

    await MatomoTracker().initialize(
        siteId: siteId,
        url: 'https://example.com/piwik.php',
        visitorId: 'customer_1',
    );

To track views simply replace StatelessWidget by TraceableStatelessWidget, StatefulWidget by TraceableStatefulWidget and finally InheritedWidget by TraceableInheritedWidget.

You can also optionally call directly trackScreen or trackScreenWithName to track a view.

For tracking goals and, events call trackGoal and trackEvent respectively.

A value can be passed for events:

MatomoTracker().trackEvent('eventName', 'eventAction', eventValue='eventValue');

Opting Out

If you want to offer a way for the user to opt out of analytics, you can use the setOptOut() call.

MatomoTracker().setOptOut(true);

所屬分類

依賴

依賴清單 7 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。