I have in app purchase in my application for iOS, Google, and Amazon. The GameAnalytics “business” event requires a currency and amount parameter. However the store plugins do not provide data in this form.
Am I just SOL for using this event type? Should I just use a design event to capture at least some of the info?
You should still use the business events, because these at least flag your users as paying and you can already segment your data based on paying and non-paying users.
You can send your data with a “mock” real-world currency such as USD for that to happen. Also, you can send a value of 0 if you do not really know the paid amount.
Just for reference though, what do the Amazon, Google Play and iOS Store return after payment ?
Yes – apple returns a numeric value and google / amazon return a string. However in all cases I don’t know what the currency is. Going down the rabbit hole of mapping a currency symbol to a GameAnalytics value is fragile, especially when their (GameAnalytics) own documentation states that they don’t handle non-US currency correctly anyway.
Actually Apple does not (via Corona). The store.loadProducts callback for iOS does not return a localized price. The property price has a numeric value, but localizedPrice has the currency symbol. For google, the price is nil and localized price again just has the currency symbol.
This is more a limitation (or bug) of the Corona Store Kit than GameAnalytics. Perhaps I should mention it over in that forum.
(I’m on daily build 2014.2237, but I’ve seen the same behavior in the release builds)
Yep – definitely using v3 since that is what allows querying product lists. The docs for google v3 show that price isn’t provided (just localized price)
You should still use the business events, because these at least flag your users as paying and you can already segment your data based on paying and non-paying users.
You can send your data with a “mock” real-world currency such as USD for that to happen. Also, you can send a value of 0 if you do not really know the paid amount.
Just for reference though, what do the Amazon, Google Play and iOS Store return after payment ?
Yes – apple returns a numeric value and google / amazon return a string. However in all cases I don’t know what the currency is. Going down the rabbit hole of mapping a currency symbol to a GameAnalytics value is fragile, especially when their (GameAnalytics) own documentation states that they don’t handle non-US currency correctly anyway.
Actually Apple does not (via Corona). The store.loadProducts callback for iOS does not return a localized price. The property price has a numeric value, but localizedPrice has the currency symbol. For google, the price is nil and localized price again just has the currency symbol.
This is more a limitation (or bug) of the Corona Store Kit than GameAnalytics. Perhaps I should mention it over in that forum.
(I’m on daily build 2014.2237, but I’ve seen the same behavior in the release builds)
Yep – definitely using v3 since that is what allows querying product lists. The docs for google v3 show that price isn’t provided (just localized price)