matomo-org / matomo-sdk-android

SDK for Android to measure your apps with Matomo. Works on Android phones, tablets, Fire TV sticks, and more!
BSD 3-Clause "New" or "Revised" License
388 stars 162 forks source link

Data is not being shown in Matomo dashboard #230

Closed sandeshnaroju closed 5 years ago

sandeshnaroju commented 5 years ago

I have setup my server with Matomo and running successfully with 2 website trackings. I wanted to add analytics for my android application. So created a new website with siteid 4. And added below code in my android app.

`public class MyApplication extends PiwikApplication {

@Override
public void onCreate() {
    super.onCreate();
    initPiwik();
}

private void initPiwik() {
    Timber.plant(new Timber.DebugTree());
    TrackHelper.track().download().identifier(new DownloadTracker.Extra.ApkChecksum(this)).with(getTracker());
}

@Override
public TrackerConfig onCreateTrackerConfig() {
    return TrackerConfig.createDefault("https://analytics.myapp.in/piwik/piwik.php", 4);
}
}`

D/PIWIK:DownloadTrackingHelper: Tracking app download... D/PIWIK:Tracker: Event added to the queue: org.piwik.sdk.TrackMe@53f41fc D/PIWIK:EventDiskCache: Cache check took 1ms D/PIWIK:EventDiskCache: Uncaching of 0 events took 0ms D/PIWIK:EventCache: Switched state to ONLINE, uncached 0 events from disk. D/PIWIK:Dispatcher: Drained 2 events. V/PIWIK:DefaultPacketSender: Connection open to https://analytics.myapp.in/piwik/piwik.php V/PIWIK:DefaultPacketSender: Transmission successful (code=200). D/PIWIK:Dispatcher: Dispatched 2 events. D/PIWIK:EventDiskCache: Cache check took 0ms

Seems like it worked. But I don't see any data in my server dashboard. It still showing the initial page "No data recorded yet" page. Do I have to disable or enable anything to get it work?

d4rken commented 5 years ago

Maybe you need to adjust the displayed date range or start data archiving. Does it show in the live feed?

Based on your logs id say it's a server issue.

sandeshnaroju commented 5 years ago

"Only track visits and actions when the action URL starts with one of the above URLs". I have enabled this during site setup. I removed it. Now it is working thanks for the amazing sdk.

d4rken commented 5 years ago

Happy to hear it's working.