Google应用邀请:跟踪邀请 [英] Google App Invites: Tracking Invites

查看:125
本文介绍了Google应用邀请:跟踪邀请的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图了解指南的这部分内容( https:// developers.google.com/app-invites/android/guides/app ):


跟踪邀请 strong>



在您的应用收到邀请并执行了预期的
操作后,它应该调用updateInvitationOnAppInstalled方法以
将邀请标记为成功:

  private void updateInvitationStatus(Intent intent){
String invitationId = AppInviteReferral.getInvitationId(intent);

//注意:这些调用返回PendingResult(s),所以也可以等到看到
//如果成功了,而不是使用fire-and-forget,就像这里显示的那样
if(AppInviteReferral.isOpenedFromPlayStore(intent)){
AppInvite.AppInviteApi.updateInvitationOnInstall(mGoogleApiClient,invitationId);

}

//如果您的邀请中包含优惠券代码等深层链接信息,您可以
//等待调用`convertInvitation`,直到当用户实际上
//使用深层链接数据时,而不是立即收到
AppInvite.AppInviteApi.convertInvitation(mGoogleApiClient,invitationId);





$ p上面的代码需要连接一个带有AppInvite.API
的GoogleApiClient 。

我发现你可以使用AppInvite.API跟踪应用邀请,但我没有看到可以查看统计信息的方式在追踪它之后。



AppInviteApi 只说了以下内容:


与AppInvite邀请进行交互的主要入口点。此
类提供了一种在安装应用程序后收到
邀请ID后更新邀请状态的方法。

< a href =https://developers.google.com/android/reference/com/google/android/gms/appinvite/AppInviteApi#updateInvitationOnInstall(com.google.android.gms.common.api.GoogleApiClient,%20java.lang .String)rel =nofollow>链接到AppInviteApi文档



如何查看我正在跟踪的内容?
我开了一个Google Analytics(分析)帐户,但它只会在1-2天内显示数据,我怀疑它甚至会在我的理解中显示,因此使用Google应用邀请时Google Analytics是可选的。

解决方案

此链接是否有帮助?: https://developers.google.com/app-invites/android/guides/analytics



只要检查一下,因为除了在Google Analytics中简单地开设帐户外,还有很多其他功能。


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.

Link to AppInviteApi docs

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.

这篇关于Google应用邀请:跟踪邀请的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆