Giter VIP home page Giter VIP logo

dart-matomo's Introduction

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

dart-matomo's People

Contributors

poitch avatar krille-chan avatar kawachencofinpro avatar stefan01 avatar bendix20 avatar lukaslihotzki avatar digitalartis4n avatar svprdga avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.