Targeting Surveys
Survey targeting rules live in the Luciq dashboard. Fetch the surveys available to the current KMP user, then decide when to show one by token.
Survey targeting is configured in the Luciq dashboard. Rules can be based on user attributes, app version, and other criteria. The SDK then determines which surveys are available for the current user.
Get available surveys
To get the list of surveys that can be shown to the current user:
scope.launch {
SurveysKmp.getAvailableSurveys().collect { surveys ->
surveys.forEach { survey ->
// survey has token and other metadata
}
}
}Use this to decide when to call SurveysKmp.showSurvey(token) or to show a custom “Take survey” entry that opens a specific survey.
Show survey if available
SurveysKmp.showSurveyIfAvailable() shows one survey from the set of available (targeted) surveys. The SDK/dashboard decides which one to show when multiple are available.
Last updated