matomo-sdk-android

Matomo SDK for Android

Build Codecov

Welcome to the Matomo Tracking SDK for Android. This library helps you send analytics data from Android apps to Matomo instances. Until v4 this library was known as Piwik Tracking SDK for Android.

Features:

Quickstart

For the not so quick start, see here or look at our demo app

repositories {
  maven { url 'https://jitpack.io' }
}
dependencies {
  implementation 'com.github.matomo-org:matomo-sdk-android:<latest-version>'
}

public class YourApplication extends Application { private Tracker tracker; public synchronized Tracker getTracker() { if (tracker == null){ tracker = TrackerBuilder.createDefault(“http://domain.tld/matomo.php”, 1).build(Matomo.getInstance(this)); } return tracker; } }


* The `TrackHelper` class is the easiest way to submit events to your tracker:
```java
// The `Tracker` instance from the previous step
Tracker tracker = ((MatomoApplication) getApplication()).getTracker();
// Track a screen view
TrackHelper.track().screen("/activity_main/activity_settings").title("Settings").with(tracker);
// Monitor your app installs
TrackHelper.track().download().with(tracker);

License

Android SDK for Matomo is released under the BSD-3 Clause license, see LICENSE.