Search packages, repositories and app categories

Package detailsv1.1.0

matomo

Cross-platform Matomo tracking for Flutter, using the Matomo API and written in pure Dart.

AndroidiOS
30-day downloads
383
Likes
30
Pub points
130

Install package

flutter pub add matomo

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A cross-platform Flutter package for integrating Matomo analytics into mobile applications, enabling event tracking and user behavior monitoring via the Matomo API. Built entirely in Dart, it supports both Android and iOS platforms, offering a lightweight and efficient solution for developers seeking to implement privacy-focused analytics without native code. The package simplifies integration with Matomo's server-side tracking infrastructure, ensuring consistent data collection across devices.

Use cases

  • Tracking user interactions in mobile apps
  • Monitoring app performance and engagement
  • Collecting custom events and goals
  • Integrating with existing Matomo analytics dashboards
  • Supporting GDPR-compliant data collection

Key features

  • Pure Dart implementation
  • Cross-platform support (Android & iOS)
  • Matomo API compatibility
  • Event and goal tracking
  • Lightweight and easy to integrate

Suitable for

  • Flutter developers using Matomo analytics
  • Apps requiring privacy-conscious tracking
  • Projects needing consistent analytics across platforms
  • Teams managing analytics via Matomo servers
  • Developers avoiding native platform-specific code

Considerations

  • Requires a running Matomo instance
  • Limited to Matomo-specific features
  • No real-time dashboard within the package
  • Dependent on Matomo API availability and configuration
  • Manual setup for advanced tracking scenarios

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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);

Categories

Dependencies

Dependency list 7 items

Source repository

Projects using this package

No data available yet.