Total revenue shown in the AppsFlyer console is significantly larger than the actual revenue.

When we review data from a CSV export, we notice that plenty of af_purchase events have USD currency but very different revenue values - for example, if an in-app is $1.99, there are some cases where this value is correctly shown (1.99 USD), but in lots of cases we are seeing incorrect data (33, 35, 40, 66, 67 USD, lots of different values).

For IAP integration we are using Unity IAP Services, and for af_purchase event the data we send is provided by Unity IAP service methods (PurchaseEventArgs class), and we read the following values from it: purchasedProduct.definition.id, purchasedProduct.metadata.localizedPrice and purchasedProduct.metadata.isoCurrencyCode (for product id, revenue and currency, respectively).

We are not formatting this data in any way, revenue value does not contain commas, currency symbols or special characters, we only get the localized revenue value for the user’s country, after the currency conversion. We checked this data on device logs and the data is shown correctly, at least for our country (i.e. $1.99 becomes RSD 199).

There are also events in the console registered from several other countries with correct revenue and currency data. We are aware that AppsFlyer automatically sets the currency to USD if none is included in the event.

Is there a possibility that Unity IAP services don't provide us with correct or complete data in all situations? We are not sure what causes this problem, but we assume that in some cases the ISO currency code string is missing or the localized price is incorrect for some reason. Any help will be appreciated.

We are using AppsFlyer SDK 5.4.1, Unity 2018.3.3f1 with In App Purchasing package 2.0.3.

1

There are 1 answers

1
SquareCat12 On BEST ANSWER

We eventually figured out what was the problem. After further analysis of events in AppsFlyer console, we concluded that all those invalid af_purchase events were made by users which have modded version of the application or have hacked in-app purchases in some other way.

We didn't have any method of purchase validation, and all those hacked in-app purchases had an incorrect receipt with random values for revenue and probably no currency, which AppsFlyer automatically assigns to USD.

We have implemented method for in-app purchase validation provided by AppsFlyer, which validates the purchase first and then sends the event to AppsFlyer console if everything is correct. With this method we filtered out invalid events and it helped us a lot in cleaning the console.