matomo
Flutter용 크로스 플랫폼 Matomo 추적, Matomo API를 사용하고 순수한 Dart로 작성됨.
다트 마토모 클라이언트
{"sdk":"flutter"}^2.0.1^0.13.1^3.0.3^1.0.4^2.0.5^1.0.1^2.0.7{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A Dart Client for Matomo. This is completely written in Dart and works cross-platform, including web.
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');
If you want to offer a way for the user to opt out of analytics, you can use the setOptOut() call.
MatomoTracker().setOptOut(true);