5 min read
Passive feedback buttons get ignored. Users are on your site to do their thing, not to hunt for a feedback form. Triggered display changes the equation: ask the right question, at the right moment, on the right page. Teams that switch from passive to triggered typically see 10-50x more responses.
FeedbackBar.open() from any JS eventThe simplest trigger. The widget stays hidden until the user has been on the page for a set number of seconds. This avoids interrupting someone who just arrived while catching users who are lingering (and possibly confused).
Go to your widget settings, then Customize Experience, then When & Where to Show and set the delay value. No code changes needed.
<script>
window.FeedbackBarConfig = {
widgetId: "your-widget-id",
behavior: {
showAfterSeconds: 10 // Show after 10 seconds on page
}
};
</script>
<script src="https://cdn.feedbackbar.io/widget.js"></script>Set to 0 or omit to show immediately.
Show the widget only on pages that match a URL pattern. Combine with different question text per page to ask context-aware questions.
<script>
window.FeedbackBarConfig = {
widgetId: "your-widget-id",
behavior: {
pattern: "/pricing*" // Only show on pricing pages
},
text: {
question: "Finding what you need?",
negativePrompt: "What's unclear about our pricing?"
}
};
</script>
<script src="https://cdn.feedbackbar.io/widget.js"></script>/pricing*pricing page and subpages/checkout/*all checkout flow pages/blog/*/commentsblog comment sections/*all pages (default)<script src="https://cdn.feedbackbar.io/widget.js" data-widget="wgt_pricing, wgt_checkout, wgt_global"></script>The most powerful option. Call FeedbackBar.open() from any JavaScript event: a button click, scroll threshold, exit intent, form abandonment, or anything else you can detect. The widget opens its feedback modal immediately.
// Open the feedback modal programmatically window.FeedbackBar.open();
This opens the modal for whichever widget is currently active on the page. It works whether the widget bar is visible or hidden.
<button onclick="FeedbackBar.open()"> Was this helpful? </button>
Override any widget setting at runtime using window.FeedbackBarConfig. This lets you change the question text, colors, position, and behavior per page without creating separate widgets in the dashboard.
Settings merge with the following priority (highest wins):
FeedbackBarConfig (client-side overrides)<script>
window.FeedbackBarConfig = {
widgetId: "your-widget-id",
// Override brand colors
theme: {
primaryColor: "#1E40AF",
textColor: "#FFFFFF",
borderRadius: 12
},
// Override position
position: {
placement: "bottom-left",
offsetX: 20,
offsetY: 20
},
// Override question text per page
text: {
question: "How's the checkout experience?",
positivePrompt: "Glad to hear! What went well?",
negativePrompt: "What almost stopped you?",
thankYouMessage: "Thanks, we read every response."
},
// Override behavior
behavior: {
showAfterSeconds: 15,
hideAfterDismiss: true,
showOnMobile: true,
collectRating: true,
collectEmail: false,
pattern: "/checkout/*"
}
};
</script>
<script src="https://cdn.feedbackbar.io/widget.js"></script>You only need to include the properties you want to override. Everything else uses your dashboard settings.
Copy-paste these patterns. Each one targets a specific moment of friction where users are most likely to share useful feedback.
Ask what's holding them back when the cursor moves toward the browser tab (desktop only).
<script>
window.FeedbackBarConfig = {
widgetId: "your-widget-id",
behavior: { pattern: "/pricing*", showAfterSeconds: 0 },
text: {
question: "Finding what you need?",
negativePrompt: "What's holding you back from signing up?"
}
};
// Trigger on exit intent (cursor leaves viewport)
document.addEventListener('mouseout', function(e) {
if (e.clientY < 10) {
window.FeedbackBar.open();
}
}, { once: true });
</script>
<script src="https://cdn.feedbackbar.io/widget.js"></script>If someone has been on checkout for 60+ seconds without completing, something is likely wrong.
<script>
window.FeedbackBarConfig = {
widgetId: "your-widget-id",
behavior: { pattern: "/checkout*", showAfterSeconds: 60 },
text: {
question: "Having trouble?",
negativePrompt: "What's getting in the way of completing your purchase?"
}
};
</script>
<script src="https://cdn.feedbackbar.io/widget.js"></script>Ask immediately after successful signup to capture friction signals while memory is fresh.
<script>
window.FeedbackBarConfig = {
widgetId: "your-widget-id",
behavior: { pattern: "/welcome*", showAfterSeconds: 3 },
text: {
question: "You made it! Quick question:",
positivePrompt: "What convinced you to sign up?",
negativePrompt: "What almost stopped you from signing up?"
}
};
</script>
<script src="https://cdn.feedbackbar.io/widget.js"></script>Only ask users who actually read the content. Ignore bouncers.
<script>
window.FeedbackBarConfig = {
widgetId: "your-widget-id",
behavior: { pattern: "/blog/*", showAfterSeconds: 0 },
text: {
question: "Was this article helpful?",
negativePrompt: "What was missing or unclear?"
}
};
// Trigger at 80% scroll depth
let triggered = false;
window.addEventListener('scroll', function() {
if (triggered) return;
const scrollPct = (window.scrollY + window.innerHeight) /
document.documentElement.scrollHeight;
if (scrollPct > 0.8) {
triggered = true;
window.FeedbackBar.open();
}
});
</script>
<script src="https://cdn.feedbackbar.io/widget.js"></script>Trigger from your app logic when a ticket is marked resolved.
// In your app code, after resolving a ticket:
function onTicketResolved() {
// Open feedback with support-specific context
window.FeedbackBar.open();
}
// FeedbackBarConfig set elsewhere with:
// text: {
// question: "Was your issue resolved?",
// negativePrompt: "What's still not working?"
// }Test different question framings to see which gets more responses or more detailed comments.
<script>
const variant = Math.random() > 0.5 ? 'direct' : 'empathetic';
window.FeedbackBarConfig = {
widgetId: "your-widget-id",
text: {
question: variant === 'direct'
? "Was this page helpful?"
: "Did you find what you were looking for?",
negativePrompt: variant === 'direct'
? "What would make it better?"
: "What were you hoping to find?"
}
};
</script>
<script src="https://cdn.feedbackbar.io/widget.js"></script>once: true on event listeners to avoid repeat triggershideAfterDismiss: true to respect "no"onceFeedbackBar automatically detects client-side navigation (pushState, replaceState, popstate). When the URL changes, the widget re-evaluates which pattern matches and shows or hides accordingly. No extra configuration needed for React, Next.js, Vue, or any SPA framework.
If you have multiple widgets with different patterns, the most specific match always wins. For example, /checkout/payment beats /checkout/* which beats /*.