No way to use "business" event?

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?

Hello, 

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 ? 

the store plugins for ios, amazon and google iap v3 all return localised prices when you call store.loadProducts.

You should be able to split the currency and amount parameter from this with some string manipulation.

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.  

http://support.gameanalytics.com/hc/communities/public/questions/200417796-Currency-is-always-?locale=en-us

Don’t remember what google and amazon returns but apple returns a string without currency symbols.

Something like this:  “2.99 USD” or “18.00 DKR”

So with a little string manipulation you will have what you need.

Edit: but yes you are right if GA doesn’t convert currencies it doesn’t make much sense to submit currencies other than USD

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)

Thanks.

You do know that you need to use the google iap v.3 plugin http://docs.coronalabs.com/plugin/google-iap-v3/index.html

to get localized prices from google play and the amazon iap plugin for amazon in app purchases: http://docs.coronalabs.com/plugin/amazon.iap/index.html

The built in store module doesn’t support neither amazon iap or retrieving localized prizes from google.

I haven’t tested iap recently, so I don’t know if a bug was introduced in recent daily builds. You should file a bug report if so.

I will be implementing iap for google and apple one of the following days, so I will let you know if I see the same thing.

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)

http://docs.coronalabs.com/plugin/google-iap-v3/loadProducts.html

Just tested iap for google / ios on daily build 2189 and 2237.

On my devices it returns strings for localised prices in this format: “7.00 dk” from both google v.3 and apple.

Hello, 

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 ? 

the store plugins for ios, amazon and google iap v3 all return localised prices when you call store.loadProducts.

You should be able to split the currency and amount parameter from this with some string manipulation.

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.  

http://support.gameanalytics.com/hc/communities/public/questions/200417796-Currency-is-always-?locale=en-us

Don’t remember what google and amazon returns but apple returns a string without currency symbols.

Something like this:  “2.99 USD” or “18.00 DKR”

So with a little string manipulation you will have what you need.

Edit: but yes you are right if GA doesn’t convert currencies it doesn’t make much sense to submit currencies other than USD

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)

Thanks.

You do know that you need to use the google iap v.3 plugin http://docs.coronalabs.com/plugin/google-iap-v3/index.html

to get localized prices from google play and the amazon iap plugin for amazon in app purchases: http://docs.coronalabs.com/plugin/amazon.iap/index.html

The built in store module doesn’t support neither amazon iap or retrieving localized prizes from google.

I haven’t tested iap recently, so I don’t know if a bug was introduced in recent daily builds. You should file a bug report if so.

I will be implementing iap for google and apple one of the following days, so I will let you know if I see the same thing.

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)

http://docs.coronalabs.com/plugin/google-iap-v3/loadProducts.html

Just tested iap for google / ios on daily build 2189 and 2237.

On my devices it returns strings for localised prices in this format: “7.00 dk” from both google v.3 and apple.