Demographic data and user opt-out
Use these methods to pass demographic data and opt-in and out users from the Sense360 iOS SDK.
Demographic data and user opt-out
To pass demographic data to Sense360 SDK, use this code snippet:
let data = DemographicData(gender: "m", age: 22, maritalStatus: "single", income: 50000, ethnicity: "white", birthYear: 1994)
Sense360.passDemographicData(data)
User opt-in and opt-out
The User opt-in and User opt-out calls are optional and, if used, you should implement both.
The Sense360.start
method is enough to enable the SDK. If the application calls User opt-out, it must call User opt-in to re-enable the SDK. Note that if the calls to Opt-In and Opt-Out are used, they replace the call to Sense360.start
since there is no need to call both.
Opt a user out of tracking at anytime by calling this method which disables the Sense360 SDK for this particular user until the user is opted back in.
Sense360.disableSurveyNotifications()
To check a user's opt-in/out status, call this method:
Sense360.areSurveyNotificationsEnabled()
To opt a user back in for tracking, call this method:
Sense360.enableSurveyNotifications()