Targeting Surveys
Detailed here is how you can target specific users for your In-App Surveys as well as related APIs for your Flutter apps.
You can define criteria that your users have to meet in order for your surveys to appear in their app. This can be done through both automatic and manual targeting. The available targeting types vary based on the survey or announcement template you're using.
Auto Targeting
After choosing the survey type you want to create, you can target specific audiences using custom conditions.
When you select Auto Targeting, you can define criteria for who should receive the survey. Your users matching the conditions you set will automatically see the survey. In addition to default attributes like App Version, OS, Email, Sessions Count, Last Seen, Country, etc., you can set conditions for custom user attributes or user events that you have created. Multiple different criteria of any type can be added.
You can specify the who, when, and frequency of the survey.
Depending on the template you use, different options will be available to use for automatic targeting.
Custom/NPS/App Rating: these three templates can automatically target using default attributes, custom attributes, and user events.
Variant Targeting
Starting from SDK version x.x.x, variant targeting is available, enabling you to display surveys to users based on app variants (e.g. free, premium, beta).
Variant targeting in Auto Targeting rules supports equals and not equals operators only.
This feature is case-sensitive and must be explicitly set in your app.
To set the app variant at runtime:
Or while initializing the SDK:
Controlling Auto Targeting
You can have auto targeting surveys shown automatically at the start of a user's session or show them manually.
Showing Automatically
By default, a survey will automatically be presented to users who meet your conditions in their first session after you publish the survey within 10 seconds of opening your app. If you have multiple surveys running and a user meets the conditions for more than one survey, they will be shown each survey one by one.
Showing Manually
You can also customize when you want to show your auto-targeting surveys. To do this, first disable automatic showing using the following API:
Then, present the surveys using the APIs below.
To get all available surveys (each returned survey has getTitle() and show() methods):
To show any of the available surveys to the user:
Auto-targeting surveys are shown once only, unless specified otherwise in the targeting section of the survey.
Targeting Through CSV
If you'd like to target a list of specific user emails, you can upload a CSV in the targeting step. Requirements:
Each email should be in a separate row.
No more than 100,000 entries.
File size less than 5 MB.
Once the file is uploaded, the dashboard will take care of the rest.
Manual Targeting Surveys
You can also use Manual Targeting to show your surveys to specific audiences, and these surveys can be re-shown any number of times.
Each created survey has a unique token that you can refer to in your code, as explained below.
Controlling Manual Targeting Surveys
When you want to target your surveys to specific users (for example, only users who opt-in), manually targeted surveys might be the best method. Use the following API to show a survey with a specific token:
You can also check if a specific user has responded to a survey through this API:
This API is particularly useful since you can manually show a survey multiple times to the same user.
Last updated