我想了解本指南的這一部分(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邀請交互。此類 類提供了在應用程序安裝後收到邀請ID後更新邀請狀態的方法。
如何查看我正在跟蹤? 我開了一個Google Analytics(分析)帳戶,但它只會在1-2天內顯示數據,我懷疑它甚至會在我的理解中顯示,因此使用Google應用邀請時Google Analytics是可選的。
我也沒有分析看到任何數據,這已經超過4-5天了。需要注意的一點是,在「指南」中提到了有關自定義維度的以下內容:「請注意,此維度必須位於自定義維度表中的索引1處。」但我的設置爲Index2,我不知道如何更改索引號。 –
我實際上看到了圖表,但它是空的,就好像沒有人使用應用程序邀請一樣。你到底在哪裏發現了「convertInvitation」這個代碼?我應該把它放在哪裏? –