Skip to main content

1. Launch SDK

Initialize the SDK:
Unity
using QonversionUnity;

private void Start()
{
    QonversionConfig config = new QonversionConfigBuilder(
            "[projectKey]",
            LaunchMode.Analytics
        ).Build();
    Qonversion.Initialize(config);
}

2. Sync Purchases (Android only)

  1. Check whether you have set your products up correctly. Make your GooglePlay subscriptions backwards compatible with having the best possible accuracy in Qonversion. Learn more here
  2. While you are using Qonversion SDKs in Analytics Mode, in-app purchases implementation is entirely on your side. Please remember to make sure you consume and acknowledge purchases to attribute them to users. Otherwise, the purchases will be automatically refunded in 3 days. See the official Android Developer documentation for processing purchase details.
  3. Sync data with Qonversion in your current purchase flow. Call syncPurchases() after every purchase.
Unity
Qonversion.GetSharedInstance().SyncPurchases();
📘 Please, do not use the Google Play Billing AIDL library to integrate Qonversion SDK with your application. It was deprecated and is not supported by Qonversion SDK.

3. (Optional) Set User ID

If you want to implement cross-platform (Android, IOS, and Web) user entitlement management, please, follow the User Identity guide. To match Qonversion revenue events to users in third-party tools, you need to set the identical user IDs in all of them:
Unity
Qonversion.GetSharedInstance().SetProperty(UserProperty.CustomUserId, "yourSideUserId");
The user ID improves the quality of events matching to the platforms where event attribution is not exclusively based on IDFA or GAID.

4. (Optional) Set IDFA (Identifier for Advertisers, iOS 14.5+ only)

On iOS 14.5+, after requesting the app tracking permission using ATT, you need to notify Qonversion if tracking is allowed and IDFA is available. This will help to have precise attribution in Adjust, AppsFlyer, Singular and other Qonversion integrations.
Unity
Qonversion.GetSharedInstance().CollectAdvertisingId();

5. (Optional) Set ASID (App set ID, Android 12+ only)

On Android 12+, you can provide an App set ID to have it used in Qonversion integrations. Add com.google.android.gms:play-services-appset as the dependency to your project and write the following code.
Unity
Qonversion.GetSharedInstance().SetProperty(UserProperty.AppSetId, appSetId);