Collect user feedback in under 2 minutes. No build step required.
Add this single script tag before the closing </body> tag on any page:
<script
src="https://your-nudgie-url.com/widget.js"
data-ff-key="YOUR_API_KEY"
defer
></script>Replace YOUR_API_KEY with your project API key from the dashboard.
Use data- attributes to customize the widget:
| Attribute | Default | Description |
|---|---|---|
| data-ff-key | — | Your project API key (required) |
| data-ff-color | #4f46e5 | Primary brand color (hex) |
| data-ff-text-color | #ffffff | Button text color (hex) |
| data-ff-position | bottom-right | Widget position: bottom-right or bottom-left |
<script
src="https://your-nudgie-url.com/widget.js"
data-ff-key="ff_abc123..."
data-ff-color="#10b981"
data-ff-text-color="#ffffff"
data-ff-position="bottom-left"
defer
></script>import Script from "next/script";
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://your-nudgie-url.com/widget.js"
data-ff-key="YOUR_API_KEY"
strategy="lazyOnload"
/>
</body>
</html>
);
}import { useEffect } from "react";
function App() {
useEffect(() => {
const script = document.createElement("script");
script.src = "https://your-nudgie-url.com/widget.js";
script.setAttribute("data-ff-key", "YOUR_API_KEY");
script.defer = true;
document.body.appendChild(script);
return () => { document.body.removeChild(script); };
}, []);
return <div>Your App</div>;
}<script setup>
import { onMounted } from "vue";
onMounted(() => {
const script = document.createElement("script");
script.src = "https://your-nudgie-url.com/widget.js";
script.setAttribute("data-ff-key", "YOUR_API_KEY");
script.defer = true;
document.body.appendChild(script);
});
</script><!DOCTYPE html>
<html>
<head><title>My Site</title></head>
<body>
<h1>Welcome</h1>
<script
src="https://your-nudgie-url.com/widget.js"
data-ff-key="YOUR_API_KEY"
defer
></script>
</body>
</html>You can also submit feedback programmatically:
curl -X POST https://your-nudgie-url.com/api/feedback \
-H "Content-Type: application/json" \
-d '{
"apiKey": "ff_abc123...",
"message": "Love this feature!",
"rating": 5,
"email": "user@example.com",
"pageUrl": "https://mysite.com/pricing"
}'apiKey (required) — Project API keymessage (required) — Feedback text (max 1000 chars)rating — 1-5 integeremail — User emailpageUrl — Page where feedback was submitted{ "success": true, "id": "60f7b2..." }Set allowed domains in your project settings to restrict which websites can submit feedback. Supports comma-separated domains and subdomain matching. Leave empty to allow all origins.
The feedback API is rate-limited to 10 requests per minute per IP address. The X-RateLimit-Remaining header indicates remaining requests.