https://github.com/codex-team/codex-surveys
https://github.com/codex-team/codex-surveys
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codex-team/codex-surveys
- Owner: codex-team
- Created: 2022-11-01T17:12:32.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-15T12:51:41.000Z (about 2 years ago)
- Last Synced: 2024-12-31T05:28:31.146Z (5 months ago)
- Language: TypeScript
- Size: 194 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CodeX Surveys
A simple widget to collect users' feedback.
## How to use Surveys
1. Create Notion [integration](https://www.notion.so/my-integrations)
2. Create Notion [database](https://www.notion.so/help/guides/creating-a-database)
3. Add connection to database
Right menu > Connections > Add connection4. Install the package
```bash
yarn add @codexteam/surveys
```5. Add widget to your page
```javascript
import { CodeXSurveys } from '@codexteam/surveys';const widget = new CodeXSurveys({
notion: {
databaseId: '',
clientSecret: '',
},
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🙏',
},
});
```