Firebase analytic counts user less than actuality

送分小仙女□ 提交于 2019-12-11 05:27:53

问题


I Have a app that loaded for statics with FireBase and TapStream. My app is not distributed from google play or other app stores. I should pay third party corporation that shared my app per installation. The count of install declared by third-party is about to TapSteram statics count. but unfortunately Firebase is so different. ( I check firebase Firest-open event for new install).

for example:

  • Third-party says people installed (or click for download your app) are 300
  • TapStream says that there are 229 new Installs
  • FireBase says 28 First-open!!

I use FireBase like this in gradle:

compile 'com.google.firebase:firebase-crash:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'

In application class:

public static FirebaseAnalytics mFirebaseAnalytics;
@Override
public void onCreate() {
    super.onCreate();
    mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
}

Am I using FireBase wrong or FireBase is not enough for Statics and I should add Google Analytic lib like we did in past before FireBase ( add tracker and ...)?


回答1:


Third parts corporations, pay some people to install your application but it is not compulsory to open it and use it. So it's possible that they install and then immediately uninstall your application without ever opening it. I use also FirebaseAnalytics for my app and i never encountered this problem , and your implementation seem be ok. FirebaseAnalytics don't update info in real time so you will wait 48 hours for real results




回答2:


Answer is this:

FireBase analytics is not enough for statics and it not count phones without Google account. We have to use google analytics Tracker ID for precis result. Then firebase can attach on that tracker ID for using of FireBase features.

read this

For finding a right answer i do 3 experience with separated project and with specific phones. every day i test the apps and wait till tomorrow (24 h) for see results. It take about one week. and here they are:

First experiment:

At first step I tried 4 project with firebase to checkout if implementation is affects on user counts or not. In all these project i put generate json file and put

classpath 'com.google.gms:google-services:3.0.0'

in project level gradle as dependency and here they are:

  1. FireBase core without any implemention. (just put dependency in gradle and not use it in code)
compile 'com.google.firebase:firebase-core:10.0.1'
  1. FireBase crash report without any implemention.
compile 'com.google.firebase:firebase-crash:10.0.1'
  1. FireBase messaging without any implemention.
compile 'com.google.firebase:firebase-messaging:10.0.1'
  1. Fire base with analytics without any implemention
compile 'com.google.android.gms:play-services-analytics:10.2.6'

I tested these 4 apps with two android phone, one with Google account on it and one without any account on it.

Result: after 24 hours all these apps statics appears on FireBase panel so I findout there is no need for Implement of FireBase in Application class. So it shows that my implemention was right and exactly there is no need for any implemention, if you want to use default tracking feature in FireBase! But Only phone with the google user account, counted as user and there is only one event for first_open event! even just that phone tracked in audience/user_property/device_model and this is my main problem. so i started second experiment.

Second experiment: In second experiment I put Analytics Tracker ID in one of these project to see is Google analytics and FireBase count users same or not.

FireBase account and Analytics account was different. For example I created project in FireBase with account x@gmail.com and put a analytics tracker ID created by account y@gmail.com (Note that this tracker ID was used before in another project but it was not active yet and as google says you can track many apps with just one Tracker ID). In this time i had 5 phones, two with google account, one with myCustomAccount (without google account) and three with no accounts. I want to check if having account is important or it just need google account. In real-time panel I see 3 ~ 4 (of 5) active user and always 1 ~ 2 is missing, so I remembered that i forgotten to put :

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

Google analytics doc says you had to put these permissions. after put these permissions Real-time panel show all of my phones! (This is odd that Analytics count my active phones without these permissions, may it gather data from Firebase, really I do not know)

Result: Two phones with google account shown in Firebase with one of no-account phones! but Analytics data was empty. there is no new user, and really nothing. that was very surprising cause i see all of my phones yesterday in real-time panel of analytics!

Third experiment: I created a new google account like z@gmail.com and both FireBase and Analytics tracker ID was from this account.

Result: Fire base and analytics show proper 5 phones, new user, active user, first_open event and every thing matches.



来源:https://stackoverflow.com/questions/45388640/firebase-analytic-counts-user-less-than-actuality

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!