Google App邀请:跟踪邀请

时间:2015-08-23 08:35:02

标签: android google-analytics google-app-invites

我正在尝试理解指南的这一部分(https://developers.google.com/app-invites/android/guides/app):

  

跟踪邀请

     

在您的应用收到邀请并采取预期后   动作,应该调用updateInvitationOnAppInstalled方法   将邀请标记为成功:

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

上述代码需要使用AppInvite.API连接GoogleApiClient   启用。

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

AppInviteApi 只是说出以下内容:

  

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

Link to AppInviteApi docs

如何查看我正在追踪的内容? 我打开了一个Google Analytics帐户,但它只会在1-2天内显示数据,我怀疑它会显示在那里,据我所知,使用Google App Invites时Google Analytics是可选的。

3 个答案:

答案 0 :(得分:1)

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

只需检查一下,因为除了在Google Analytics中开设帐户外,还有很多内容。

答案 1 :(得分:0)

我不知道您是否找到了解决问题的方法,但我目前遇到了同样的问题。 我在Google Analytics信息中心上看不到任何内容。 此外,当我在终端

中使用thoses命令时,我没有看到日志上的antyhing
adb shell setprop log.tag.GAv4 DEBUG
adb logcat -s GAv4 

在日志中,我可以看到我实施的自定义事件,如最喜欢的项目......

Hit delivery requested [...........]
Hit sent to the device AnalyticsService for delivery

当我查看名为Invitation Actions Totals的小部件时,我可以看到它在事件类别中使用正则表达式来匹配invitation

所以也许我们必须手动处理它。 我的意思是,也许我们必须使用HitBuilders.EventBuilder()来构建和发送自定义事件。

例如,当用户发送邀请时,我们必须使用:

Tracker t = ((AnalyticsApplication) activity.getApplication()).getDefaultTracker();

t.send(new HitBuilders.EventBuilder()
    .setCategory("invitation")
    .setAction("sent")
    .build());

当用户从邀请中打开应用时:

Tracker t = ((AnalyticsApplication) activity.getApplication()).getDefaultTracker();

t.send(new HitBuilders.EventBuilder()
    .setCategory("invitation")
    .setAction("completed")
    .build());

为了更准确,我们可以使用setLabel方法来定义邀请ID。

到目前为止我还没有测试过它。我不知道我们是否必须以这种方式处理它,或者AppInvite是否自动处理它。 但我们可能需要手动处理它,因为我们可以在没有Google Analytics的情况下使用App Invite ...

答案 2 :(得分:0)

使用Firebase邀请通过电子邮件或短信推送应用引荐和分享

  

通过将口碑的力量与无摩擦和个性化的入职流程相结合,Firebase Invites通过让用户与他们认识的人共享应用或他们喜爱的应用内内容来帮助推动安装。 Firebase邀请函可帮助您优化应用发现的重要方式 - 根据Google和Ipsos MediaCT调查,52%的人表示他们会通过口口相传发现应用。

Firebase Link

Referral link