GithubHelp home page GithubHelp logo

codex-surveys's Introduction

CodeX Surveys

A simple widget to collect users' feedback.

surveys

How to use Surveys

  1. Create Notion integration

  2. Create Notion database

  3. Add connection to database Right menu > Connections > Add connection

  4. Install the package

  yarn add @codexteam/surveys
  1. Add widget to your page
import { CodeXSurveys } from '@codexteam/surveys';

const widget = new CodeXSurveys({
  notion: {
    databaseId: '<Notion Database ID>',
    clientSecret: '<Notion Client ID>',
  },
  form: {
    description:
      'We want to better understand your goals and requirements. Please, provide us some insights.',
    items: [
      {
        label: 'Product type',
        field: {
          name: 'product_type',
          type: 'select',
          options: ['B2B', 'B2C'],
        },
      },
      {
        label: 'Your product size',
        field: {
          type: 'select',
          name: 'product_size',
          options: ['<100 DAU', '100 DAU - 1000 DAU', '> 1000 DAU'],
        },
      },
      {
        label: 'Your software license',
        field: {
          name: 'software_license',
          type: 'select',
          options: ['Freeware / Open-Source', 'Permissive', 'Proprietary'],
        },
      },
      {
        label: 'Your suggestions to the Editor.js',
        field: {
          name: 'suggestions',
          type: 'textarea',
          placeholder: 'Enter your ideas, requests or issues',
        },
      },
    ],
  },
  widget: {
    title: 'Using Editor.js?',
    description: 'Take a 2-minutes survey🙏',
  },
});

codex-surveys's People

Contributors

kseniass avatar slaveeks avatar tatianafomina avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

codex-surveys's Issues

[User Story] Metric tracking implementation

User Story (as SRS) for metric tracking implementation of Surveys project

by @Can4ly

User Story

I am, as a developer/product manager of Surveys, want to count Surveys widget events with acceptance of the page’s owner for tracking amount of the key value events and calculate effectiveness metric

Actor
– (I am, as) A developer/product manager of Surveys

Action
– (want to) Count Surveys widget events with acceptance of the page’s owner

Value
– (for) Tracking amount of the key value events and calculate effectiveness metric

Usage Scenario

Actor Action Result
1 Owner of landing page with Surveys widget Configure widget, mark and agree to send additional info to the devs Surveys widget is configured and placed on a landing page. Scenarios 2,3,4 will perform
2 User of landing page with Surveys widget Scroll up/down to the widget (widget show) User see the widget. (If scenario №1 is true) Information about action sends to the database. Sending process is hidden for user.
3 User of landing page with Surveys widget Expand the widget (widget expand) User expand the widget and see next step. (If scenario №1 is true) Information about action sends to the database. Sending process is hidden for user.
4 User of landing page with Surveys widget Send the feedback via Surveys widget (form submit) User fill/leave empty feedback field and send it. (If scenario №1 is true) Information about action sends to the database. Sending process is hidden for user

Acceptance Criteria

Criteria
1 All data collection will perform if and only if owner of the landing page agreed by marking / checking / pressing “Send info to the devs” unit
2 UX is not affected by implemented mechanism of data collection process
3 All saved information is stored in a database and can be extracted by devs
4 Surveys users and owners of landing pages have no access to the database or it’s data
5 Sending data consists of at least:

1) Time and date
2) ClientID (Landing ID)
3) UserID
4) Event type
6 Event types are:

1) Widget show (user scroll down to the widget and see it)
2) Widget expand (user press button and expand the widget)
3) Form submit (user send feedback by pressing corresponding button)

Any questions? Feel free to ask!
tg @Can4ly,
[email protected]

Implement a proxy for passing data to the Notion API

We can't send data from the client-side library due to CORS restrictions. So we need a proxy that will accept passed data and re-send it to the Notion API.

  1. CodeX Surveys shows the widget
  2. User fills out the form and presses Submit
  3. CodeX Surveys sends data to our proxy, which has * in CORS headers.
  4. Proxy accepts data and sends it to user's Notion database

Strange cursor behavior

2023-01-23.19.07.32.mov

I think, it will be better to remove pointer behavior of cursor from form.

Installation guide is not clear

Tried to set up Surveys following the readme, but I still lack of success.

Create Notion integration

What next? What do I need to do with Integration Token? Which Capabilities do I need to enable?

Add connection to database Right menu > Connections > Add connection

Which kind of Right menu? After some time, I found that and added a connection, but what next?

Add widget to your page

We need to write that user need to put some tokens into the code

notion: {
    databaseId: '<Notion Database ID>',
    clientSecret: '<Notion Client ID>',
  },

where to get Notion Database ID and Notion Client ID?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.