I would like to implement google firestore in my app, to collect some basic data about what options of app users use the most and how. Since it is not a small task, before I do, I would like to know, is there a way to get some statistics from that database and filter categories (all categories will be provided by users) like country, type of OS, version of app, and search for specific user by his id/email?
I don't think Firestore will have the functionality of providing statistics about the app user. However, most of the details you mentioned can be tracked with Google Analytics for Firebase.
Additionally, it is also possible to create other Custom Events and log these events from your application, as mentioned in the Log events section of the documentation.
If you want to know what events are automatically logged, refer to the Automatically collected events page of the GA4 documentation.
Related
I wish to monitor app behavior and debug application on different devices.
I am trying to select the best approach, Firebase analytics, crashlitics, Goole analytics etc...
The problem:
User report on some devices they see incorrect app behavior (Not crash). For example user reports button not working, I wish to check if the user actually clicked the button and what happened.
What I need:
I need to find that specific user (or phone) in the monitoring system mentioned above and check the logs I added (for example: firebaseAnalytics.logEvent...)
Solution questions
Can I find specific user or phone in firebaseAnalytics? What is the best approach to addressing my requirements?
You can use Firebase Analytics Event Logging & Set User Id.
With this feature, you can keep track of users' logs, later generate statistics in Firebase Analytics or Google Analytics, and track specific users if you wish.
check this links
Firebase Analytics Set User Id
Firebase Analytics Event Logging
And If you want check not you wanted situation, you can add a custom exception to firebase.
try like this code.
if(isExpectedSituation) {
// some your codes.
} else {
FirebaseCrashlytics.getInstance().recordException(YourCustomException());
}
I am converting my app to use the new Firebase analytics instead of the google analytics. But I am missing some key features that I use in google analytics that are just not there.
First when I send an event, you can add a bundle with data. I added a bundle but where can I see the data I send? Or is this not possible with the free plan?
The second thing that I miss is the live view, is there some way to see live what's happening, or is this a feature still coming.
Hopefully can somebody clear these things out.
Firebase is far superior to Google Analytics in many ways, so I would recommend you try to experiment with it a lot to get hold of how it is working and the features it is offering.
First when I send an event, you can add a bundle with data. I added a bundle but where can I see the data I send? Or is this not possible with the free plan?
You are right, you cannot see your raw event data on the Firebase console. It just shows you the Event names, which you can use for creating Funnels (user flows, conversions) as well as different kinds of Audiences.
To see your raw event data, you will have to purchase a plan. If you have got a large user base, you better use the Blaze plan which is pay per use or else take the Flame plan. https://firebase.google.com/pricing/
Once you take a plan, you will be able to see all your Events on a Google BigQuery platform where you can query data easily.
The second thing that I miss is the live view, is there some way to see live what's happening, or is this a feature still coming.
The Events take time to get logged on the Firebase console. In my experience it varied from 2 to 6 hours. For BigQuery, I could see the Event data only after the next day i.e. close to 24 hrs delay.
Hope this helps.
Update for May 2017
You can now see event parameters in the Firebase console (see announcement). Go to Events, click ⋮, Edit parameter reporting. The distribution of event parameters will then be visible in the dashboard for that event. Note that it's unfortunately not retroactive, so you'll have to wait for new events to be logged.
Firebase now has a real-time view called StreamView
Background
Google allows to perform app-invites and also track how well they improve your app installations:
https://www.youtube.com/watch?v=UfdCNYXMC9M
The problem
I made a simple app invite, and it seems people do use it, using this code:
public static Intent getAppInviteIntent(Context context) {
return new AppInviteInvitation.IntentBuilder(title,appName).setCustomImage(imageUri).setMessage(message).setCallToActionText(download).build();
}
startActivityForResult(getAppInviteIntent(this), GOOGLE_APP_INVITES_REQUEST_CODE);
This works, but in the Analytics webpage, I can't find a way to show the statistics of the app-invite, and that's even though they say it's automatic (here). Sadly, even what I've found seem quite old and they use deprecated functions.
What I've tried
I thought that maybe it's not quite automatic (because the tutorial has some extra code for the receiver part too, here), and that we might need to add some code, as this docs say :
When the user accepts an invitation and installs the app, getInvitation(GoogleApiClient, Activity, boolean) will update the invitation state to installed and return the invitation data in an intent accessed from AppInviteInvitationResult using getInvitationIntent()
Looking at Google's sample (here), I've noticed they created 2 activities. One is the main activity, which does have a call to "getInvitation" , and another is called "DeepLinkActivity" , and handles deep links (which is probably for extra data, like coupons).
I've also found some stackOverflow questions about the tracking (like here), but all I see is that people didn't succeed tracking yet.
The questions
What is the minimal code needed in order to track the invitations and how well they work, as shown on the video? What should be configured in Analytics page itself? I don't use deep linking currently, so I don't want to use it.
It seems that Google moved the app-invites feature to "firebase" gradle repositories. Is it a must-have? What are the advantages? We currently use the previous ones ("com.google.android.gms:play-services-appinvite:..." ). The dashboard of FireBase doesn't seem to include as much UI for analytics as Google Analytics. Not to mention of app-invites.
If the answer to #1 is that I need to use "getInvitationIntent", does it have to be on the main activity of the app ? Does it have to be in an activity at all (maybe broadcastReceiver?) ?
It seems it's possible to also invite to IOS too ( as shown here and here, using "setOtherPlatformsTargetApplication"). Is this correct? How does it work? What happens when an IOS user clicks the link? What should be put into the parameter of "clientId" and where do I get it from ?
Does G+ have app-invites? If so, does it also have analytics?
Great questions. I'll do my best to answer everything. Please ask if you need clarification.
Analytics tracking requires a tracking Id that you'll need to set using setGoogleAnalyticsTrackingId(String trackingId), which I don't see in your example. This tracking Id is then handed to the downstream events that record analytics tracking events for you:
When invitations are send (both email and sms).
When the invited user accepts the invitation by clicking on the invitation link or button.
When the developer calls getInvitation()
When the developer calls convertInvitation()
So, to answer your specific questions, here goes:
Just add your tracking ID to the builder as described above, and all the tracking events will be reported. No need for a deeplink, that's optional on invites.
Yes, appinvites api is copied to firebase while retaining the original. For now they are exactly the same. Future improvements will be in firebase, so migrate when you have time.
getInvitationIntent() is called on the result returned in the callback from getInvitation(), so the callback should be within an activity. Also, since you'll only expect an invitation immediately after launch, you really only need to check in the main activity and any activity that would be launched from intent filters that trigger on the deeplink. Sounds like you don't use deeplinks, so only the main activity. Generally you should call getInvitation() from all activities that may be directly launched from an invitation, this is how you determine if your app is launched from an invitation.
Yes, invites can go cross-platform in both directions, iOS -> android, and android -> iOS. You need to define both apps in the same project in console.developers.google.com, which is necessary to associate them. If there is more than one iOS app in the project, that api call is necessary to disambiguate the iOS app that is paired with the android app. The ClientID parameter is generated in the console when you create the OAuth Client Id using the pulldown menu from credentials section.
There isn't any separate G+ invites.
Answers:
The Firebase Dynamic Links on Android documentation explains how to view the analytics data shown directly in the Firebase console. The critical step is to follow the Firebase setup instructions, most importantly:
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
The Firebase analytics integration has been streamlined from the legacy integration that required a tracking Id. Now with Firebase only setup and a call to getInvitation() are needed. No additional code or tracking ids required. Remember it takes up to 24 hours to see the results in the console. However, you can see the messages being sent immediately which is a great indication that it's working. Just enable verbose logging as described in Analytics Log Events documentation.
The Firebase and android developer documentation for appinvites are identical.
Yes, you must call getInvitation() to get analytics tracking, and do the setup as described above.
The iOS and Android equivalence apps should be in the same project. Just move them to a single project in the Firebase console. You can just remove one from it's existing project and add it to the other to make a combined project. The change should be reflected instantly.
Is Tracking of user Behavior like which activity user saw, what time he saw them , and all possible. Or Can this only be done from the back end ?
Does Google Analytic Premium has this feature ?
Edit:
We are looking to track the user behavior on android application and want to know the details of the pages the user has visited within the app.
The Google Analytics gives me the count of the visits however it does not confirm as to who visited which page. The user_id tracking for Google Analytics is not working for some reasons.
Is there a tool where we can record the user behavior to eventually improve the app functionality.
If you want to track individual users, you need to send a unique userId to google analytics as a custom dimension value. Make sure the Id you send to google is not PII as that is against google's privacy policy. You don't need to have a premium account to implement this behavior.
If you are not aware of how custom dimensions work, please check this link for more info on it
https://support.google.com/analytics/answer/2709828?hl=en
Also for things like at what time a particular user viewed a page, you can look at generating Custom Reports. Select Parameter Time from Dimensions Tab in Custom Reports. More info here.
https://support.google.com/analytics/answer/1151300?hl=en
I have two themes for my Android application.
I want to know how many users are using each theme.
I'm using Flurry for analytics, but can't find way to save sate about each user (Flurry is an event driven service, which isn't what I want).
It sounds like a common thing that analytics service should support.
Is there a way to do so with Flurry? or Google Analytics?
If not, what is the best tool for this kind of analytics?
You just need to generate an event with a suitable parameter for the information you want to gather. I do this global state with an event in my main activity entry point.
The data will be per that event rather than per user but so long as the users of one theme don't have distincly different usage pattent to another then the stats should be valid.