UserFeedback Quick Reference
Collect user feedback with simple thumbs up/down buttons
Key Features
- Add feedback buttons to any page
- Thumbs up/down voting
- Track feedback responses
- Customizable prompt text
- Anonymous feedback collection
- Feedback analytics and reporting
- Export feedback data
Extension Usage:
// Add feedback buttons to a page
[{/OpenForum/AddOn/UserFeedback text="Was this helpful?"}]
// Without text
[{/OpenForum/AddOn/UserFeedback}]
Parameters
- text - Optional text to display before the buttons
Server-Side Usage:
// Get the UserFeedback API
var UserFeedback = js.getObject("/OpenForum/AddOn/UserFeedback","UserFeedback.sjs");
// Record feedback
UserFeedback.recordFeedback("/MyPage", true); // true = positive, false = negative
// Get feedback for page
var feedback = UserFeedback.getFeedback("/MyPage");
// Get feedback statistics
var stats = UserFeedback.getStatistics("/MyPage");
Client-Side Usage:
// Record feedback
JSON.post('/OpenForum/AddOn/UserFeedback/Record', null,
'pageName=/MyPage&positive=true')
.onSuccess(function(result) {
console.log('Feedback recorded');
}).go();
// Get feedback stats
JSON.get('/OpenForum/AddOn/UserFeedback/Stats', null,
'pageName=/MyPage')
.onSuccess(function(stats) {
console.log('Positive:', stats.positive);
console.log('Negative:', stats.negative);
}).go();
Feedback Statistics Format
{
pageName: "/MyPage",
positive: 25,
negative: 3,
total: 28,
score: 0.89
}
Configuration
- Feedback button text
- Anonymous or authenticated voting
- Feedback storage location