How to Automate Customer Feedback Collection
Tags: customerfeedback, productfeedback, javascript, form
Published: 2023-02-20 07:21:41

A comprehensive guide on how to configure a dynamic product feedback form for your JavaScript application using SurveyJS.

![Product Feedback Survey - SurveyJS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vtaedlyyae1kah6lzge9.jpg)

## Why bother with customer feedback?
Collection of customer feedback on products or services you market is a critical and integral part of the product development cycle and is essential for business growth.

Understanding how customers feel about a product, a service, or a brand in general can help find opportunities for innovation, or simply detect customer service deficiency.

## From Offline to Online
Widely spread customer feedback kiosks and devices do a great job in measuring overall feedback, but they have lots of limitations that we won’t be covering in this article. Due to the shift from brick-and-mortar to online shops and the rise of new technologies, a great deal of products and services are sold from a distance, where a seller and a buyer have never met in person. So, the only way to make sure a customer has a positive experience is to ask for some feedback online using the same website they used to place an order in the first place.

## Ask for More Than an Emoji Can Tell
To get a comprehensive understanding of how customers evaluate their experience of interacting with your products or services, and receive actionable insights, an emoji feedback widget is simply not enough. So, it’s important to create a [complex multi-step Product Feedback Survey](https://surveyjs.io/form-library/examples/product-feedback-survey-template/reactjs) that does not only provide you with answers, but enables you to analyze them afterwards.

To achieve this, you would need to use _a variety of question types_ to collect both _quantitative_ and _qualitative_ data from your customers. You might also need to ask some of your respondents a follow-up question, hide one or more questions from others, or even implement several different survey flows that vary subsequent questions based on certain answers. Such a survey form needs to be tailored to _match a specific design_ of your website or portal. Finally, you don’t want to spend hours designing it and weeks to have it updated.

## Why is Convention Not the Option?
While online survey services can provide a simple and relatively low-cost (at least, in the short run) solution to form creation and embedding, they come with limitations in terms of customization and data ownership. Since the survey data is stored on third-party servers, concerns about data privacy and security are never off the table. Moreover, such online survey services might not be able to offer full adaptation due to internal constraints.

If you use the traditional approach to building surveys, which involves using HTML/JavaScript with custom validation logic, HTTP requests, and a database, even a minor change such as adding a new question would require you to make separate modifications to the server, database, and frontend code, and would take days unless you have a proper CI/CD pipeline in place.

## Why Choose SurveyJS Form Library for Web Forms?

SurveyJS is a fast, versatile, free, and open-source (MIT license) [JavaScript client-side library](https://surveyjs.io/form-library) for [React](https://surveyjs.io/form-library/documentation/get-started-react), [Angular](https://surveyjs.io/form-library/documentation/get-started-angular), [Vue.js](https://surveyjs.io/form-library/documentation/get-started-vue), [Knockout](https://surveyjs.io/form-library/documentation/get-started-knockout), and [jQuery](https://surveyjs.io/form-library/documentation/get-started-jquery) that can be used to build forms and surveys of any complexity. It has a data-driven approach — fully dynamic surveys defined as JSON schemas, with templating for UI elements. Since all survey data is in industry-standard JSON format, the frontend and the backend are separated, so you can use [any server + database combination](https://surveyjs.io/documentation/backend-integration) with it.

SurveyJS offers a very straightforward approach to survey design and customization — you can select from a variety of built-in themes and [personalize them with custom CSS code](https://surveyjs.io/form-library/examples/create-custom-ui-theme/reactjs). It also supports [automatic survey localization](https://surveyjs.io/form-library/examples/survey-localization/reactjs) and the integration of third-party JavaScript components, such as [Bootstrap Slider](https://surveyjs.io/form-library/examples/custom-widget-bootstrapslider/reactjs) or [noUiSlider](https://surveyjs.io/form-library/examples/custom-widget-nouislider/reactjs), and many others.

With SurveyJS you can improve implementation speed, make maintenance easier, and any changes made to a survey take mere seconds to reflect in the frontend. **Since it’s self-hosted**, it lets you **retain full ownership of respondents’ data**, without giving up privacy or being locked into an online survey service you can’t control.

## Questions to Ask in a Product Feedback Survey
Before we jump into the ocean of possible questions you can use in your Product Feedback Survey, it’s important to plan an analysis strategy beforehand, so you don’t find yourself in another ocean — of disorganized and unmeasurable answers.

There are two major data types that can be gathered with a feedback survey — qualitative and quantitative.

_**Quantitative data**_ refers to numerical data. It’s always collected using close-ended questions, and requires a specific answer (such as “yes” or “no”), a selection from a limited set of options, or a single value that could later be assigned to a predefined value range group.

Here are a few questions that you can use to collect quantitative data:

### How did you first hear about us? (Search engine (Google, Bing, etc.), online newsletter, blog post, word of mouth, social media)

[A radio button group](https://surveyjs.io/form-library/examples/single-select-radio-button-group/reactjs) is a perfect question type choice here, since it allows respondents to select only a single option. Received results can be grouped by answer and visualized using a classical [pie or bar chart](https://surveyjs.io/dashboard/examples/interactive-survey-data-dashboard/reactjs).

![A radio button group question  - SurveyJS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/65nztq1i9z3q1q9l1bk7.png)

### To what extent do you agree with the following statements? (Strongly disagree, Disagree, Undecided, Agree, Strongly agree)

This type of question is best implemented with a [Single Selection Matrix Table](https://surveyjs.io/form-library/examples/single-selection-matrix-table-question/reactjs). One of its main advantages is the ability to group several rows of questions that can be answered with the same set of options specified in columns. Then answers to each question from a group can be analyzed separately using charts with percentage values representing these options.

![A single selection matrix table - SurveyJS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxv5xx74l9axya8r43jh.png)

### On a scale of 1–5, how would you rate your buying experience?

This is a [Rating question](https://surveyjs.io/form-library/examples/questiontype-rating/reactjs) type that asks respondents to rate or evaluate a particular aspect of a product, service, or in our case — buying experience, on a numerical or descriptive scale and choose a number or label that best reflects their opinion.

![A rating question - SurveyJS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hlgocgycsby4als0bsp3.png)

### Have you used similar products before?

This is a simple [“Yes/No” question](https://surveyjs.io/form-library/examples/yes-no-question/reactjs), also known as a Boolean question. And we could use it as is, but it would leave us with no information on competitors that our dear customers also use. So, in order to get more details, we want to configure a conditional rule that triggers a follow-up question asking to specify competitors if a respondent replies with “Yes”.

![A "Yes/No" question - SurveyJS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bu46liq1eq65kxn84163.png)

Here is an extract from the JSON file that shows a [visibleIf property](https://surveyjs.io/form-library/documentation/api-reference/question#visibleIf) with an expression: `{have-used-similar-products} = true`. The expression returns `true` if the answer to the “have-used-similar-products” question is “Yes”. This triggers a follow-up question named “similar-products”.

{% embed https://gist.github.com/JaneSjs/2f80e4ef0b36a2e20b9ae40c6e4bc61e %}

You can configure this rule by manually writing it in JSON, or use a [free survey tool](https://surveyjs.io/create-free-survey) that auto-generates survey definitions in JSON format for you as you drag and drop questions and apply various configurations including skip logic rules in a no-code UI. Such a survey definition is called a [Survey Model](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model), or a schema.

![How to configure conditional logic and branching in survey forms - SurveyJS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mou0j37mmthckf8tiasw.png)

Now let’s take a quick look at what question types are available to collect _**qualitative data**_.

_**Qualitative data**_, as opposed to numerical and more structured quantitative data, is descriptive data that provides a more in-depth understanding of the customer experience with the product and can give valuable insights into customer needs, expectations, and behavior. Since it requires open-ended questions, it gives a respondent enough space to speak out and share information that might be missed with pre-defined choice options.

Here are a few question types that you can use to collect this type of data:

### What’s the main reason for your score?

This is a follow-up to the buying experience question we discussed earlier. Since there could be various reasons why a customer selected one of the low score values, instead of listing all possible reasons that led to a poor buying experience, it’s better to just let a customer describe it using their own words. A [Text Area](https://surveyjs.io/form-library/examples/questiontype-comment/reactjs) would be the best option: it allows users to fit enough information to give you an understanding of a particular situation, while limiting the number of characters that can be entered to prevent overwhelming you with pages of text.

![A rating question with a text area for details - SurveyJS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sr04ekgmfc0v2ccpocsv.png)

### What’s the ONE thing our product is missing?

This question requires a simple [Text Entry field](https://surveyjs.io/form-library/examples/text-entry-question/reactjs) since you only need it to fit one phrase or a sentence.

![A text entry field - SurveyJS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zl5tlxr1jqfn79ccofa5.png)

Both quantitative and qualitative data are important in a Product Feedback Survey because they provide different types of information. As you can see from the examples we covered, they are most effective when used together. You can gather numerical information and use it to compare the product with others, track trends over time, and measure customer satisfaction. And when you need to get more details or simply want to learn how customers solve a certain issue and you don't have any data to transform it to quantitative questions - just let respondents speak for themselves!

## SurveyJS in Action

To demonstrate how easy it is to configure a multi-step survey, here's a ready-to-use [Product Feedback Survey](https://surveyjs.io/form-library/examples/product-feedback-survey-template/reactjs) made with SurveyJS.

{% embed https://codesandbox.io/embed/angry-banzai-l6b7yq?fontsize=14&hidenavigation=1&theme=dark&view=preview %}

## Where to start?

Once you have decided on the type of data you want to obtain from customers, selected appropriate question types, and thought through your survey flow, you are ready to [generate a survey JSON schema](https://surveyjs.io/create-free-survey). You then need to install and configure (using that JSON file) a framework-specific npm package by following one of the [dedicated getting started guides](https://surveyjs.io/form-library/documentation/get-started) available for each frontend technology, and implement the backend. To help you get a backend up and running quickly, SurveyJS has created [demo examples for ASP.NET Core, NodeJS, PHP, and WordPress](https://surveyjs.io/backend-integration/examples) that you can use for free.
If you want to know more about the architecture of all SurveyJS libraries, please refer to the [SurveyJS Architecture](https://surveyjs.io/documentation/surveyjs-architecture) guide.

## Conclusion

Customer feedback collection will always be an integral part of business growth as it lets you gain valuable and actionable insights. By introducing SurveyJS to your form workflow, you can make this process not only easy and enjoyable, but secure - as it lets you stay in control of all sensitive respondent data you receive.
Happy surveying!