PythonAPI reference
Surveys
In-product surveys — fetch what a user is eligible for, submit answers.
// access
client.surveysIn-product surveys — fetch what a user is eligible for, submit answers.
Surveys
classclient.surveys — headless: you render, Nexus targets and stores.
Extends Resource.
active()
methoddef active(*, distinct_id=None, device_key=None, properties=None, device_type=None, os_type=None) -> List[Any]Surveys this user may see (targeting, sampling and capping applied).
Parameters
Prop
Type
Returns List[Any]
respond()
methoddef respond(survey_id, answers=None, *, completed=None, dismissed=None, response_id=None, iteration_key=None, distinct_id=None, session_key=None, device_key=None, os_type=None, os_version=None, browser=None, app_version=None, country=None, url=None) -> Dict[str, Any]Submit a response (partial or complete); answers keyed by question id.
Returns {id, completed}. Pass the returned id back as
response_id to keep appending to the same response.
Parameters
Prop
Type
Returns Dict[str, Any]
complete()
methoddef complete(survey_id, answers, **options) -> Dict[str, Any]Submit a completed response in one call.
Parameters
Prop
Type
Returns Dict[str, Any]
dismiss()
methoddef dismiss(survey_id, **options) -> Dict[str, Any]Record that the user dismissed the survey.
Parameters
Prop
Type
Returns Dict[str, Any]
