@codexteam/surveys
v0.0.5
Published
A simple widget to collect users' feedback.
Downloads
4
Keywords
Readme
CodeX Surveys
A simple widget to collect users' feedback.
How to use Surveys
Create Notion integration
Create Notion database
Add connection to database Right menu > Connections > Add connection
Install the package
yarn add @codexteam/surveys
- 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🙏',
},
});