In-app purchases
In-App purchase tracking will work only in connection with Adjust/Appsflyer. To connect them, follow this guide for Adjust and this guide for Appsflyer.
It's possible to track in-app purchase information and send info to Appodeal servers for analytics. It allows to group users by the fact of purchasing in-apps. This will help you to adjust the ads for such users or simply turn it off, if needed. To make this setting work correctly, please submit the purchase info via the Appodeal SDK.
Step 1. Validate In-app Purchases
To make this work correctly, please submit the purchase information via Appodeal SDK.
Please make sure to use all the parameters from the method below and don't comment out any of them.
Appodeal.validateAndTrack( inAppPurchase: "some product id", type: .autoRenewableSubscription, price: "9.99", currency: "USD", transactionId: "some transaction id", additionalParameters: additionalParameters, success: { [weak self] in self?.alert("Purchase is valid", message: $0.description) }, failure: { [weak self] error, _ in self?.alert("Purchase is invalid", message: error?.localizedDescription) } )
Please make sure if you have created in-app product in App Store Connect to use:
- .consumable or .nonConsumable for purchase type,
- .autoRenewableSubscription or .nonRenewingSubscription for subscription.
Parameter | Description | Usage |
---|---|---|
inAppPurchase | some product id | Adjust/AppsFlyer |
type | Type must be :
| Adjust/AppsFlyer |
price | In-app event revenue. | Adjust/AppsFlyer/Appodeal |
currency | In-app event currency. | Adjust/AppsFlyer/Appodeal |
transactionId | some transaction id | Adjust/AppsFlyer |
additionalParameters | Additional parameters of the in-app event. |
If you are using your own Adjust account you need to complete Step 2 from our Event Tracking guide and create some required events on Adjust side.
Step 2. Contact Us
After all completed steps contact our support team via email support@appodeal.com or a live chat with the following information :
- Purchases implementation logic in your app (when and where you call validate method and validate purchases).
- Allow us to test purchases in your app and send us the testflight to email support@appodeal.com.