我正在开发一个概念验证 Android 应用程序,该应用程序使用 AWS Mobile Analytics 来跟踪应用程序中的 session 和事件。我能够暂停和恢复 session ,并创建自定义事件,所有内容都会按预期反射(reflect)在相应的图表中。现在,在移动分析控制台中,有一些图表显示收入或与收入有关的某些指标(ARPDAU、ARPPDAU),以及收入选项卡,所有这些目前没有任何值。目前我的每用户终身值(value)如下所示:
收入选项卡如何填充?我是否必须使用 Google 应用内购买、FB 付款或亚马逊付款来实际购买某些东西才能填充?当用户购买时,它会自动填充吗?或者是否有 API 调用可供我调用来填充这些值?
这个问题听起来很愚蠢,但老实说,我找不到与此相关的像样的文档,并且测试付款需要我一段时间,因为我对此 PoC 使用的帐户的控制有限。
最佳答案
假设您使用的是 AWS Android (Java) SDK,看起来他们有一个用于发送获利事件的构建器模式。
http://docs.aws.amazon.com/AWSAndroidSDK/latest/javadoc/
他们对每种类型的商店都有单独的模式,因此 Google Play 的代码如下所示:(无耻地从文档中复制)
// get the event client from your MobileAnalyticsManager instance EventClient eventClient = mobileAnalyticsManager.getEventClient(); // create a builder that can record purchase events for Google Play IAP GooglePlayMonetizationEventBuilder builder = GooglePlayMonetizationEventBuilder.create(eventClient); // build the monetization event with the product id, formatted item price, transaction id, and quantity // product id and formatted item price can be obtained from the JSONObject returned by a product sku request to Google's In App Billing API // transaction id is obtained from the Purchase object that is returned upon the completion of a purchase // Google IAP currently only supports a quantity of 1 Event purchaseEvent = builder.withProductId(sku).withFormattedItemPrice(price).withTransactionId(purchase.getOrderId()).withQuantity(1).build(); // record the monetization event eventClient.recordEvent(purchaseEvent);
关于android - 填充 AWS Mobile Analytics 收入图表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25802359/