0.0.1 • Published 7 years ago

microsurvey v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Microsurvey

Lightweight audience selection for survey applications. The researcher and statistician on top of microask's survey builder.

Usage

Set up a survey:

var microsurvey = require('microsurvey');
var survey = microsurvey({
  id: 'my-survey-id',
  multipleResponsesAllowed: false, // can a session respond multiple times?
  promptLimit: 5,                  // how many responses are allowed?
  promptPercentage: 0.8,           // odds that a session will see the survey
});

Now, check whether the survey is available:

if (survey.isAvailable) {
  // ... show survey
}

...and update it when responses are received:

function onSurveyResponse () {
  survey.track();
}

License

MIT