yandexmobile / metrica-plugin-cordova

Cordova plugin for Yandex AppMetrica SDK
Other
11 stars 26 forks source link

User activity tracking #2

Open newbot23 opened 7 years ago

newbot23 commented 7 years ago

Have integrated appmetrica in my app, I see events in dashboard, but no active users. What could be the reason?

According to Android SDK docs there is an autotracking funtionality (method YandexMetrica.enableActivityAutoTracking(this);). Does it work in cordova?

bamx23 commented 7 years ago

AppMetrica here uses functionality of activity tracking available for Cordova plugins. https://github.com/yandexmobile/metrica-plugin-cordova/blob/master/platforms/android/com/yandex/metrica/plugin/cordova/AppMetricaPlugin.java#L81 These methods should be called by Cordova to track user activity. Could you check if they being called in your application?

newbot23 commented 7 years ago

According to Documentation YandexMetrica.enableActivityAutoTracking(this); is an alternative to onResumeActivity(Activity activity) / onPauseActivity(Activity activity). According to the Java Code in your plugin these methods were used in activate method. Data is not available in the dashboard in real time, so it's kind of hard to understand whether the tracking works correct or not. Right now I see acitve users yesterday and today too. I'm not sure whether it's just a lag in data availability or a techical issue.

bamx23 commented 7 years ago

I see. It could be just a lag of a data transporting. If you realise that onResumeActivity / onPauseActivity don't work I will replace them with the call of enableActivityAutoTracking on activation.

newbot23 commented 7 years ago

According to appmetrica support lag should no exceed 2 minutes. Right now I have opened a case at appmetrica support. It does look like I see active devices today in dashboard, but no events and no active users.

newbot23 commented 7 years ago

I have tested integration today - it looks like the app does not send data to server immediately. If you minimize the app and switch back - events are delivered to the server.

bamx23 commented 7 years ago

It's quite strange. I'll investigate this. By the way, our tester had no such problem. Does the sample in this repository work the same?

newbot23 commented 7 years ago

I have increased the events counts, so they push the events package to the server. I see a very strange report: https://www.dropbox.com/s/rxfp35kpy33khje/Screenshot%202017-05-15%2015.21.40.png?dl=0 No users, but 2 devices, how that could be possible? It seems to me that there is a connection between tracking user activity (not events) and tracking installs. I can restart application, do other things and when additional user appers in the dashboard.

newbot23 commented 7 years ago

I have tested the sample app and see same issues - no users, but events in the dashboard.