Try it out here: https://ycb.github.io/free-feedback-tool-google-sheets/
A lightweight, customizable feedback tool for web applications that allows users to submit feedback directly from your website with optional Google Sheets integration.
- Element Inspection: Click on any element to provide feedback
- Screenshot Capture: Automatically captures screenshots of the feedback location
- Multiple Feedback Types: Bug reports, suggestions, and praise
- Sentiment Tracking: Positive, neutral, or negative feedback
- Google Sheets Integration: Optional automatic sync to Google Sheets
- Local Storage Fallback: Works offline with localStorage backup
- Keyboard Shortcuts:
Ctrl+Shift+Fto start feedback mode - Responsive Design: Works on desktop and mobile devices
npm install @ycb/free-feedback-tool-google-sheetsimport React from 'react';
import { FeedbackSystem } from '@ycb/free-feedback-tool-google-sheets';
function App() {
return (
<div>
<h1>My Website</h1>
<p>Your website content here...</p>
{/* Add the feedback system */}
<FeedbackSystem />
</div>
);
}- Create a Google Apps Script that receives POST data and writes to a Google Sheet
- Set the environment variable:
VITE_GOOGLE_APPS_SCRIPT_URL=https://script.google.com/macros/s/YOUR_SCRIPT_ID/execCreate a new Google Apps Script with the following code:
function doPost(e) {
try {
const data = JSON.parse(e.postData.contents);
// Open your Google Sheet
const sheet = SpreadsheetApp.openById('YOUR_SHEET_ID').getActiveSheet();
// Add headers if this is the first row
if (sheet.getLastRow() === 0) {
sheet.getRange(1, 1, 1, 8).setValues([
['Timestamp', 'Category', 'Sentiment', 'Message', 'Email', 'Page URL', 'User Agent', 'Screenshot']
]);
}
// Add the feedback data
sheet.appendRow([
data.timestamp,
data.category,
data.sentiment,
data.message,
data.email || '',
data.pageUrl,
data.userAgent,
data.screenshot
]);
return ContentService
.createTextOutput(JSON.stringify({ success: true }))
.setMimeType(ContentService.MimeType.JSON);
} catch (error) {
return ContentService
.createTextOutput(JSON.stringify({ success: false, error: error.toString() }))
.setMimeType(ContentService.MimeType.JSON);
}
}- Click "Provide Feedback" button or press
Ctrl+Shift+F - Click any element on your website to pin it
- Fill out the feedback form with category, sentiment, and message
- Submit feedback - it's automatically saved to localStorage and optionally sent to Google Sheets
The tool uses Tailwind CSS classes and can be customized by overriding the default styles:
.feedback-pin {
/* Custom pin styles */
}
.feedback-modal {
/* Custom modal styles */
}<FeedbackSystem
googleSheetsUrl="https://script.google.com/macros/s/YOUR_SCRIPT_ID/exec"
categories={['bug', 'suggestion', 'praise', 'feature-request']}
sentiments={['positive', 'neutral', 'negative']}
theme="light" // or "dark"
/>Check out the live demo in the test-full.html file:
# Serve the demo locally
python3 -m http.server 3000
# Open http://localhost:3000/test-full.htmlnpm run buildnpm testnpm run devFeedbackSystem- Main componentFeedbackModal- Modal dialog for feedback formFloatingFeedbackButton- Floating action buttonFeedbackPin- Visual pin for clicked elements- UI Components (Button, Dialog, Input, etc.)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details
- Create an issue for bug reports
- Start a discussion for feature requests
- Check the demo page for usage examples
Made with ❤️ for better user feedback collection