@integraflow/web
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Integraflow Web SDK

npm package MIT License

Integraflow provides tools to redefine customer experience with organic feedback and behavioural data in real-time. Enjoy intuitive designs, open source surveys, advanced analytics, seamless collaboration on the go.

Get Started with CDN

Start by adding the following snippet to your website:

<script>
  (function(w,p){w[p]=w[p]||function(){w[p].q=w[p].q||[];w[p].q.push(arguments)}})(window,"Integraflow");

  Integraflow('init', {
    surveys: [],
    debug: true,
    onAudienceChanged(audience) {
      // ...
    },
    onEventTracked(payload) {
      // ...
    },
    onSurveyDisplayed(surveyId) {
      // ...
    },
    onQuestionAnswered(surveyId, questionId, answers) {
      // ...
    },
    onSurveyCompleted(surveyId) {
      // ...
    },
    onSurveyClosed(surveyId) {
      // ...
    },
  });
</script>
<script src="https://unpkg.com/@integraflow/web/dist/web-bundle.js" async></script>

For more information on integrating the Web SDK with your project, please see the Integraflow developer guide.

Get Started with NPM

Start by adding the package dependency to your project:

npm install --save @integraflow/web

After installation, import and initialize the SDK in your application code:

import Integraflow from '@integraflow/web';

const integraflowClient = Integraflow.init({
  surveys: [],
  debug: true,
  onAudienceChanged(audience) {
    // ...
  },
  onEventTracked(payload) {
    // ...
  },
  onSurveyDisplayed(surveyId) {
    // ...
  },
  onQuestionAnswered(surveyId, questionId, answers) {
    // ...
  },
  onSurveyCompleted(surveyId) {
    // ...
  },
  onSurveyClosed(surveyId) {
    // ...
  },
});

For more information on integrating the Web SDK with your project, please see the Integraflow developer guide.

Contributing

Pull requests are welcome for any improvements you might wish to make. If it's something big and you're not sure about it yet, we'd be happy to discuss it first. You can either file an issue or drop us a line to dev@useintegraflow.com.

To get started with development, simply clone this repo and open the project to kick things off.

License

This project is licensed under the MIT license. See our LICENSE file and individual source files for more information.

Package Sidebar

Install

npm i @integraflow/web

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

1.27 MB

Total Files

59

Last publish

Collaborators

  • folasope
  • afeezlawal
  • jkdamilola