I'm trying to understand this part of the guide (https://developers.google.com/app-invites/android/guides/app):
Tracking Invitations
After your app has received an invitation and taken the intended actions, it should call the updateInvitationOnAppInstalled method to mark the invitation as successful:
private void updateInvitationStatus(Intent intent) { String invitationId = AppInviteReferral.getInvitationId(intent); // Note: these calls return PendingResult(s), so one could also wait to see // if this succeeds instead of using fire-and-forget, as is shown here if (AppInviteReferral.isOpenedFromPlayStore(intent)) { AppInvite.AppInviteApi.updateInvitationOnInstall(mGoogleApiClient,invitationId); } // If your invitation contains deep link information such as a coupon code, you may // want to wait to call `convertInvitation` until the time when the user actually // uses the deep link data, rather than immediately upon receipt AppInvite.AppInviteApi.convertInvitation(mGoogleApiClient, invitationId); }
The code above requires a connected GoogleApiClient with AppInvite.API enabled.
I see you can track app invites with AppInvite.API but I don't see a way in which one can view the stats after tracking it.
The AppInviteApi just says the following:
The main entry point for interacting with AppInvite invitations. This class provides a method to update invitation status after receiving an invitation id after app installation.
How can I view what I'm tracking? I opened a Google Analytics account but it will only display data in 1-2 days and I doubt it will even be displayed there as from my understanding, Google Analytics is optional when using Google App Invites.
Does this link help at all?: https://developers.google.com/app-invites/android/guides/analytics
Just checking, as there is a lot more to it than simple opening an account in Google Analytics.
I don't know if you found a way to solve your problem but I'm currently having the same problem. I see nothing on my Google Analytics dashboard. Moreover I do not see antyhing on logs when i'm using thoses commands in terminal
In thoses logs I can see custom events I implemented like favorite items...
When I'm looking at widget called
Invitation Actions Totals
I can see it uses a regular expression on event categorie to matchinvitation
.So maybe we have to handle it manually. I mean, maybe we have to use
HitBuilders.EventBuilder()
to build and send custom event.For example, when user send an invite we have to use:
And when user open the app from an invite:
And to be more accurate we could use the
setLabel
method to define the invite ID.I haven't tested it so far. I don't know if we have to handle it this way or if AppInvite handle it automatically. But we probably have to handle it manually because we can use App Invite without Google Analytics...
Use Firebase Invites to drive app referrals and sharing through email or SMS
Firebase Link
Referral link