Analytics Mode
Implement subscription analytics in 20 minutes without changing your existing in-app purchases flow.
Analytics (Observer) mode allows you to get the best-in-class analytics in minutes. You can also use real-time subscriptions events in third-party integrations, webhooks, and get accurate Apple Search Ads attribution using this mode. You don't need to change your current in-app purchases flow.
After you install the SDK, follow the steps below.
1. Launch SDK
Initialize the SDK:
import Qonversion
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let config = Qonversion.Configuration(projectKey: "projectKey", launchMode: .analytics)
Qonversion.initWithConfig(config)
return true
}
#import "Qonversion.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
QONConfiguration *configuration = [[QONConfiguration alloc] initWithProjectKey:@"projectKey" launchMode:QONLaunchModeAnalytics];
[Qonversion initWithConfig:configuration];
return YES;
}
import com.qonversion.android.sdk.Qonversion;
import com.qonversion.android.sdk.QonversionConfig;
import com.qonversion.android.sdk.Qonversion.dto.QLaunchMode;
public class App extends Application {
@Override
public void onCreate() {
super.onCreate();
final QonversionConfig qonversionConfig = new QonversionConfig.Builder(
this,
"projectKey",
QLaunchMode.Analytics
).build();
Qonversion.initialize(qonversionConfig);
}
}
import com.qonversion.android.sdk.Qonversion
import com.qonversion.android.sdk.QonversionConfig
import com.qonversion.android.sdk.Qonversion.dto.QLaunchMode
public class App : Application {
override fun onCreate() {
super.onCreate()
val qonversionConfig = QonversionConfig.Builder(
this,
"projectKey",
QLaunchMode.Analytics
).build()
Qonversion.initialize(qonversionConfig)
}
}
import 'package:qonversion_flutter/qonversion_flutter.dart';
final config = new QonversionConfigBuilder(
'projectKey',
QLaunchMode.analytics
).build();
Qonversion.initialize(config);
import Qonversion, {
QonversionConfigBuilder,
LaunchMode,
} from 'react-native-qonversion';
const config = new QonversionConfigBuilder(
'projectKey',
LaunchMode.ANALYTICS
).build();
Qonversion.initialize(config);
using QonversionUnity;
private void Start()
{
QonversionConfig config = new QonversionConfigBuilder(
"projectKey",
LaunchMode.Analytics
).Build();
Qonversion.Initialize(config);
}
Qonversion.launch('projectKey', true);
→ Get your Qonversion Project Key
2. Sync Purchases (Android only)
-
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. Remember to 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.
-
Sync data with Qonversion in your current purchase flow. Call
syncPurchases()
after every purchase.
Qonversion.getSharedInstance().syncPurchases();
Qonversion.shared.syncPurchases()
Qonversion.getSharedInstance().syncPurchases();
Qonversion.getSharedInstance().syncPurchases();
Qonversion.GetSharedInstance().SyncPurchases();
Qonversion.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) 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.
Updated 24 days ago