Mobile SDKs Reference

Initialize the SDK

As a first you’ll need to install our SDK in your mobile app. You can find detailed installation methods directly in the Github code repositories.

Each repositories also include a sample application showing you how to load and initialize the client.

Right after loading the SDK, you’ll need to initialize the client by providing your Refiner environment ID. You can find the ID under “Settings > Mobile SDK” in the Refiner dashboard.

Identify your users

You can provide a unique identifier for a user with the “Identify User” method. Identifying a user with a unique ID is a mandatory step for native mobile in-app surveys.

Next to a unique user ID, you can also provide additional user traits. You can also use our API or integrations to provide the same user traits.

If you are using our multi-language surveys feature, you can provide a “locale” string to show surveys in a specific language.

When a user logs out from your app or changes user accounts, you can call the “Reset User” method.

Track screen visit

Whenever your user navigates to a specific screen in your app, you can use the “Track Screen” method to surface that information to Refiner.

Tracking screens will allow you to launch surveys in specific areas in your app. In the Refiner dashboard, you can create a set of screen rules for each survey which determines on which screens a survey should be launched.

Provide contextual data

Next to providing user traits, it is also possible to attach contextual data to survey responses. The “Attach to Response” method lets you provide such data.

Track user events

You can track events whenever a user performs an important key action in your app (log-in, purchase, …). Tracked events can be used to created User Segments and Target Audiences in Refiner.

Show survey programmatically

Sometimes you might want to show a survey programmatically, directly from your application’s code, instead of relying on targeting rules defined in the Refiner dashboard. The mobile SDK exposes a “Show Form” method that allows you to do exactly this.

Please make sure that your survey is using the “Manual” trigger event in “Targeting” section of the survey editor.

Was this helpful? Let us know with a quick a vote