Google Analytics logs not appearing on Dashboard when sent from Android - android

I am trying to send custom google analytics log events in android, but on Google Analytics Dashboard Real-time view these logs do not show. I have to reinstall app to see the logs showing there.
I searched on google but couldn't find any relevant issues (for android). Docs mentions that it should happen within few seconds.
This is the code that I am using. I am using Jetpack compose.
...
analytics.logEvent(event.name) {
event.params?.forEach { param ->
param(param.key, param.value)
}
...
I could see that logs are sent to the server but not sure why they aren't showing in real-time view. Is my understanding correct or does it takes some time for Mobile?

Related

Monitor android application for user debug

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());
}

Firebase conversions on Google ads?

I don't really know if im in the correct forum, but please if not, point me in the right direction.
I have a little problem: I have setted up a campaing for downloads of the App from a client (A corporation) this campaing is setted on the objective of the first_open(Android) on firebase. I've talked with my associated account executive and he tells me we should also have another campaing with a first_open (iOS) objective.
Here is where the problem starts. The google executive tells me we should have an event called first_open (iOS) which should be a separated event from first_open (Android), but I can't find this. It's not listed as an event on firebase nor google analytics web + app, I've tryed creating this event on my own but can't seem to get it working.
If I go into firebase conversions or events, I can only see one first_open event, that I can use a filter on, and see Android/iOS independently, but I can't seem to export it in separate to Google Ads conversions. There are some events called something like this, but they show 0 conversions.
If I can use the filter on firebase to see iOS first opens, how come I cant seem to see this conversions in Ads??
Also, how come I can extract this "Conversion events" from firebase, through google ads, but I'm not able to see them on firebase nor analytics?
Thank you!
I had a similar issue. In my Firebase settings, my iOS App was missing the app id and team id. After filling in that data, I was able to setup a iOS conversations in Google Ads.
We had exactly the same issue. I have done 2 things that solve the problem.
Supplied the missing App ID in Firebase
Setup adSupport.framework in the app
To add to Mark Currie's answer -
As soon as I entered App Id and Team Id in Firebase, iOS conversions started showing in Google Ads.
For finding team id, as of today, you have to look at Apple Developer Account => Identifiers => App ID prefix

Why isn't shown any log of analytics events on my crashlytics console

I'm facing a weird crash on my app, I'd like to analyse it better using the firebase crashlytics console by analysing the analytics events that were generated on the section that has crashed. I've seen in documentations and videos that it would happen automatically and these analytics event would be shown at the "logs" tab, but for some reason my crashes don't contain these logs...
Does anyone have some clue of what I should do to make these logs be shown at my "log" tab on the console?
Obs:
- The crashes are being displayed on the console without any problem.
- Below I included an image that shows the exact tab I'm expecting to see these "analytics events". My console is in portuguese, but the "Registros" tab is the "logs" tab in the english version.
Fabric/Firebaser here - Google Analytics logs can come through to your Crashlytics sessions as long as you've enabled data sharing between GA and other Firebase products, and we call them breadcrumbs. One thing you can check to make sure nothing obvious is going wrong is your project's Analytics settings. If you head to Project Settings > Integrations > Google Analytics, you can scroll down to the data sharing portion of the integration to ensure that data is being shared between Analytics and other products.
It's also possible that Analytics itself isn't being configured correctly. You can take a look at your console logs to ensure that Analytics is reporting, and enable debug mode for more information.
Finally, it's possible that the crash happened before the breadcrumbs were captured. I'd especially expect this to be the culprit if you're noticing other crashes usually have the Analytics information you're expecting.
If you've got any specific questions or issues and the above doesn't help, feel free to reach out to support and they should be able to dig into it deeper.

How to correctly use and track App-invites?

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.

How to extract engagement flow data using google analytics reporting api

I am building an Android app that uses Google Analytics to record various Events and Screens throughout the app. The Engagement Flow dashboard is quite striking but I'd like to export the data and play with it on my own. How can I write my app so that I can extract the data that is used in the Engagement Flow dashboard using the Google Core Reporting API?
Currently, I am using sendEvent and sendView to track Events and Screens respectively in the Engagement Flow. I'm guessing my approach is working because the report works correctly in the Google Analytics UI, but I can't get the data out using the Core Reporting API for Android. I am fairly confident this is doable because I've been able to access the data using the query explorer for our website with the ga:previousPagePath and ga:pagePath dimensions (see screenshot below), but the same thing does not work for the Android SDK. I can get some data out using an undocumented ga:screenName dimension, but the corresponding ga:previousScreenName (and any permutation thereof) does not exist. Thoughts?
For what its worth, others have had similar questions in case its useful:
How to get “Visitors Flow” data from Google Analytics GAPI API?
Get Google Analytics "Visitors Flow" data from API
According to Google-Analytics, as of now this feature is not available.

Categories

Resources