How to correctly use and track App-invites?

后端 未结 2 1981
夕颜
夕颜 2021-02-12 13:20

Background

Google allows to perform app-invites and also track how well they improve your app installations:

https://www.youtube.com/watch?v=UfdCNYXMC9M

<
相关标签:
2条回答
  • 2021-02-12 13:30

    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:

    1. 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.
    2. 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.
    3. 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.
    4. 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.
    5. There isn't any separate G+ invites.
    0 讨论(0)
  • 2021-02-12 13:32

    Answers:

    1. 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.

    1. The Firebase and android developer documentation for appinvites are identical.

    2. Yes, you must call getInvitation() to get analytics tracking, and do the setup as described above.

    3. 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.

    0 讨论(0)
提交回复
热议问题