Overview
The helpful rating widget provides a simple thumbs up/down interface perfect for collecting binary feedback on documentation pages, articles, or support content. It’s lightweight, customizable, and can optionally include a comment form for detailed feedback.See it in action at the bottom of this page!
Quick Start
Add the helpful rating widget to your page with a single script tag:Configuration Options
Customize the widget’s appearance and behavior using data attributes:Required Attributes
Your unique project identifier from the SeggWat dashboard
Optional Attributes
Custom question text to display above the buttonsExample:
Hex color code for the buttons (e.g.,
#10b981)The widget automatically generates hover states and maintains accessibility.Show “Add a comment” link after a negative ratingWhen enabled and the user clicks “No”, they’ll see a link to add additional context. If the feedback widget is also loaded on the page, it opens the feedback modal. Otherwise, it expands an inline comment form.Example:
CSS selector for custom placementBy default, the widget inserts inline at the script tag location. Use this to place it in a specific container.Example:
Language code for the widget UISupported languages:
en, de, svFalls back to English if unsupported. Auto-detects from browser if not specified.Track ratings against specific application versions (e.g.,
1.2.3, v2.0.0-beta)Helps correlate ratings with releases and identify version-specific issues.Show or hide the “Powered by SeggWat” branding in the footerNote: The helpful widget defaults to hidden branding (unlike the feedback button which shows it by default).Set to
true, 1, or yes to show the branding.Override the API endpoint (useful for self-hosted or staging environments)
Examples
Basic Usage
Custom Question
With Comment Link
Placed in Container
German Language
Full Configuration
JavaScript API
The widget exposes a global API for programmatic control:Set User ID
Associate ratings with specific users:- Max 255 characters
- Alphanumeric characters, hyphens, and underscores only
- Examples:
user_12345,cust-abc-123,USR_98765
Reset Widget
Reset the widget to its initial state:Access Container
Access the widget’s DOM element:Combining with Feedback Widget
The helpful widget works seamlessly with the feedback button. When both are loaded anddata-show-comment-link="true", clicking “Add a comment” opens the feedback modal:
Use Cases
Documentation Pages
Collect feedback on help articles, API references, and tutorials. Identify which pages need improvement.
Knowledge Base
Measure the effectiveness of support articles. Track which solutions actually help users.
Blog Posts
Gauge reader satisfaction and content quality. Understand which topics resonate with your audience.
Product Guides
Validate that user manuals and onboarding guides are clear and helpful.
How It Works
- The script loads and auto-detects your site’s base URL
- Core library loads automatically if not already present
- Widget inserts at script location (or specified container)
- User clicks “Yes” or “No”
- Rating submits to
POST /api/v1/rating/submit - Widget shows thank you message
- Optional: User clicks “Add a comment” to provide details
API Endpoint
The widget submits ratings to:204 No Content on success
Best Practices
Placement
Placement
Place the widget at the end of your content, after users have consumed the information. Common locations:
- Bottom of documentation pages
- End of support articles
- After tutorial steps
Enable Comments for Negative Ratings
Enable Comments for Negative Ratings
Set
data-show-comment-link="true" to understand why users found content unhelpful. This qualitative feedback is invaluable for improvements.Match Your Audience
Match Your Audience
Set
data-language to match your primary audience’s language. The auto-detection works well for multilingual sites.Track by Version
Track by Version
If you version your docs or content, use
data-version to correlate ratings with specific releases or updates.Track Authenticated Users
Track Authenticated Users
For logged-in experiences, use
setUser() to enable:- Preventing duplicate ratings from the same user
- Following up with users who left negative ratings
- Correlating ratings with user segments
Styling
The widget uses the SeggWat design system and automatically adapts to light/dark mode. It’s designed to blend seamlessly with most documentation sites. CSS Classes (for custom styling):.seggwat-helpful- Root container.seggwat-helpful-question- Question text.seggwat-helpful-buttons- Button container.seggwat-helpful-btn- Individual buttons.seggwat-helpful-btn-yes- Yes button.seggwat-helpful-btn-no- No button.seggwat-helpful-message- Feedback messages.seggwat-helpful-comment-link- “Add a comment” link
Accessibility
The helpful widget is built with accessibility in mind:- Semantic HTML with proper button elements
- ARIA labels for screen readers
- Keyboard navigation support
- Focus indicators
- Sufficient color contrast
- Disabled state for submitted ratings
Troubleshooting
Widget not appearing
Widget not appearing
Check these issues:
- Verify the script URL is correct:
https://seggwat.com/static/widgets/v1/seggwat-helpful.js - Ensure your project key is correct
- Check browser console for JavaScript errors
- If using
data-container, verify the selector exists in the DOM
Ratings not submitting
Ratings not submitting
Common causes:
- Check browser Network tab for failed API calls
- Verify you’re viewing the correct project in dashboard
- Rate limiting (10 second cooldown between submissions)
- Check for CORS issues in console
Comment link not working
Comment link not working
Translations not loading
Translations not loading
Check:
- Language code is valid:
en,de, orsv - Network tab shows translation file loading
- Falls back to English if translation file fails
- Custom
data-api-urlpoints to correct server
data-show-comment-link="true"is set correctly