Skip to main content
GitHub release

Install

Qonversion SDK package is available on npm.
You can check the implementation details of the Web SDK here.

Launching the SDK

First of all, you need to create the launching configuration. It can be made using the QonversionConfigBuilder class as follows.
You can also provide additional configuration if necessary.
After the configuration is prepared, you should initialize the SDK using it.
Now you are ready to use the SDK. All the work with the SDK is done via the initialized instance.
Make sure you have called Qonversion.initialize() before you call Qonversion.getSharedInstance() as it will throw an Error if no instance is configured. Note that some configurations can be changed after the initialization, but we recommend setting everything necessary before it. Nonetheless, if you want to change, let’s say, the log tag of the configured instance, call the corresponding method on it.

Properties

User properties are attributes you can set on a user level. You can send user properties to third-party platforms and use them in Qonversion for customer segmentation and analytics. You can read more about user properties here. We defined some common case properties and provided API for adding them:
You can also provide custom properties using the following method.
If you need to set several properties, you can call the above methods multiple times or use the UserPropertiesBuilder class, which provides a well-known builder pattern for combining properties. After you have set all the necessary properties, you can send them to Qonversion with a single call of the following method.
To get all the properties set to a user, you can call the userProperties method, that returns an object, containing all the properties.
The return UserProperties class contains several utility fields and methods:

Purchases

Qonversion Web SDK accepts Stripe and Paddle purchases. We are working on supporting more billing providers. To send the purchase to Qonversion after you receive a successful response from your billing provider, call the matching method and provide the received data.
Once you have successfully sent a purchase, request the updated user entitlements using the method described below and grant a user the necessary access.

Entitlements

To let Qonversion handle user entitlements, you should configure them in the Qonversion dashboard first. After you have it done, Qonversion will grant entitlements to the current user each time you send us a successful purchase. Then you can get the current user entitlements as follows.

Identity

User Identity allows cross-device & cross-platform user identification and access management. You can read more about it here. When a user logs into his account, call identify().
And when a user logs out call logout()
Consider looking at the examples here to better understand identify() at work.

Next steps

The Web SDK is set up. Connect a billing provider and manage cross-platform access. Start by wiring up Stripe or Paddle and mapping their products into your Qonversion entitlements.