How to correctly use and track App-invites?

后端 未结 2 1980
夕颜
夕颜 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条回答
  •  -上瘾入骨i
    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.

提交回复
热议问题