1. Launch SDK
Initialize the SDK in Analytics mode:2. Sync Purchases
iOS, StoreKit 2
Subscriptions only
In case you’re using StoreKit Version 1, we automatically handle all the needed data about transactions that occurred. However, in the case of StoreKit Version 2, it is necessary to leverage thesyncStoreKit2Purchases() SDK method. Call this function every time you receive a successful purchase result or auto-renewed transaction.
syncStoreKit2Purchases() is part of the Swift-only API and lives on QonversionSwift, not on Qonversion. With Swift Package Manager it is in the QonversionSwift module, so add import QonversionSwift; with CocoaPods everything is in the single Qonversion module. The method is not available from Objective-C — QonversionSwift is not exposed to the Objective-C runtime. StoreKit 2 itself requires iOS 15.0, macOS 12.0, tvOS 15.0 or watchOS 8.0; on earlier systems the call does nothing.Subscriptions & Consumables
In case you’re using StoreKit Version 2 and selling Subscriptions and Consumables we recommend using one of these methods before finishing transactions: These three methods are also Swift-only (QonversionSwift) and are marked @available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, visionOS 1.0, *).
Android
- Check whether you have set your products up correctly. Make your GooglePlay subscriptions backwards compatible to have the best possible accuracy in Qonversion. Learn more here
-
While you are using Qonversion SDKs in Analytics Mode, in-app purchases implementation is entirely on your side, which means acknowledging every purchase is on your side too.
If your app does not acknowledge or consume a purchase within 3 days, Google Play refunds it and revokes the entitlement. The 3 days count from the moment the purchase reaches the
PURCHASEDstate. Consume consumable products and acknowledge everything else. See the Google Play Billing documentation on processing purchase details. Purchases made by license testers follow the same rule on a shortened schedule: an unacknowledged test purchase is refunded within minutes. Test subscriptions also renew on an accelerated schedule and renew at most six times. See Test Google Play Billing and Test Purchases — Google Play. -
Sync data with Qonversion in your current purchase flow. Call
syncPurchases()after every purchase.
3. (Optional) Enable Server-to-Server notifications
Qonversion checks user receipts regularly and does not require server-to-server notifications from Apple or Google. Nevertheless, due to these notifications, your analytics charts, third-party integrations and webhooks will work much closer to real-time.- Guide on Apple Server-to-Server Notifications
- Guide on Google Developer Notifications
4. Set additional user attributes
Optionally, to improve attribution in Adjust, AppsFlyer, Singular, or to match Qonversion revenue events to users in third-party tools, you can share with us such attributes as User Identifier, IDFA (Identifier for Advertisers, iOS 14.5+ only) or ASID (App set ID, Android 12+ only). Please, follow this guide to learn more.Next steps
With Analytics Mode running, put your subscription data to work. For near real-time charts, also enable Apple Server-to-Server Notifications and Google Developer Notifications.Set user properties
Attach custom user properties to segment subscribers and improve attribution.
Connect integrations
Forward real-time subscription events to Adjust, AppsFlyer, Amplitude, and more.
Explore analytics
Track subscription revenue, conversions, and cohorts in the Qonversion dashboard.
Enable server notifications
Add Apple and Google server notifications for near real-time analytics.