NudgeKit docs
Overview
NudgeKit shows small, well-timed messages inside your app — slide-outs, notification bars, pop-ups and quick surveys — and can send a follow-up email or webhook when the same conditions match.
It was built because most in-app messaging tools are heavy, pricey, and pushy. NudgeKit keeps it simple: a few conditions, one message, then it gets out of the way. It's privacy-focused by design — no copy of your customer list, no emails or names stored, and activity that purges itself. Nudges that help people, not ones that annoy them.
Getting started
NudgeKit is open source. You run your own copy, sign in to the dashboard, and add one snippet to your app.
- Clone the repository and deploy it to your own hosting.
- Connect a Postgres database with auth and file storage, and run the included migrations.
- Enable email/password sign-in in your own auth service, keep email confirmation on, and configure an email sender. Add your site's URL and
/reset-passwordto its allowed redirect URLs. - Create an account with your email and password, confirm your email, and sign in. A workspace is created for you automatically.
- Open Install, copy the snippet, and paste it into your app's layout.
- Create a campaign, set it live, and visit your app to see it.
Recommended setup
Self-hosted copies default to email/password sign-in — no Google setup required. Copy .env.example to .env.local and use your own backend values, replacing any inherited deployment values. Keep VITE_NUDGEKIT_AUTH_MODE=email. To offer Google instead (or both), set it to google (or all) and configure that provider in your own auth service. Selecting a mode changes the sign-in page; provider access is configured separately. This site's owner uses Google.
- Serve the widget from your own domain (for example
nudge.yourapp.com) so ad blockers are less likely to block it. - Pass a stable user ID, like your database ID — never an email. NudgeKit scrambles it before storing it.
- Pass the plan on every page load with
data-nk-plan. Plans are read live and never saved. - Add a Resend API key as the
RESEND_API_KEYserver secret if you want lifecycle emails, and verify your sending domain. - Keep retention short. 90 days covers most campaigns; lower it if you only use "current page" triggers.
- Schedule the daily cleanup job so inactive activity is purged automatically.
Overview page
The first screen after signing in. It shows how your messages are doing across the whole workspace: live campaigns, impressions, clicks (with click rate), dismissals, emails sent, and survey responses. Below the totals is a list of your campaigns and their status.

Campaigns
A campaign is one message plus the rules for who sees it and when. The Campaigns page lists every campaign with its type and status. Open one to edit it, or view its results for impressions, clicks, and survey answers.

Message types
- Slide-out — a small card in the corner.
- Notification bar — a slim strip at the top or bottom.
- Pop-up — a centered modal for important moments.
- Survey — NPS (0–10) or a 1–5 scale, with an optional comment.
- Email — sent once when a user matches.
- Webhook — a signed POST to Bento, Zapier, or your own endpoint.
Each message has a headline, body, button, and an optional icon or small image (a headshot works great). The preview on the right updates as you type.

Audience & triggers
Add conditions — all of them must match. For example: plan is free, visited /billing within 3 days, and signed up at least 7 days ago → show a slide-out.
- Plan — is or is not a selected plan.
- Time since signup — at least or at most a number of days.
- Time since last login — at least or at most a number of days.
- Page visits — has or has not visited a specific page.
- Custom events — has or has not performed an event.
- Current page — matches a specific page in your app.
Page visits and performed events can be specified by N days. When every condition matches, the campaign can show a slide-out, notification bar, pop-up or survey, or send an email or webhook.
Delivery
Pick a start and end date, how many times a person can see the message, and the minimum hours between showings. Emails can wait a set number of hours after the first match. Messages can be dismissible or not.
Install
Your snippet and write key live here. Add the script once to your app's layout and fill in the user ID and plan. To track actions, call window.nudgekit('track', 'event_name') from your app.

Settings
- Workspace name — shown only to you.
- Delete inactive user data after — how many days to keep page history and events (1–730, default 90).
- Sender address — the "from" on lifecycle emails. Needs a verified domain.
- Plan names — comma separated; these appear in plan conditions.
- Send results to your analytics — forwards shown, click, dismiss, and survey events to Plausible, DataFast, Fathom, PostHog, Mixpanel, or Google Tag Manager if they're on your site.

FAQs
How do I connect Plausible, DataFast, Fathom, PostHog, Mixpanel or Google Tag Manager?
There's nothing to connect. If the tool's script is already on your site, NudgeKit spots it and sends "Nudge Shown", "Nudge Click", "Nudge Dismissed" and "Nudge Survey Response" events with the campaign name. Just leave Send results to your analytics on in Settings.
Where do I see which nudge made money?
In your analytics tool. Add the Nudge events as goals in Plausible or Fathom, or use DataFast's revenue attribution, which links a nudge click to the purchase that follows. NudgeKit itself shows views, clicks, click rate and survey answers.
In Google Tag Manager, what do I set up?
Create a Custom Event trigger matching nudgekit_.*. Event details arrive as nudge_campaign, nudge_type and similar variables.
What if I use a different analytics tool?
Listen for browser events: nudgekit:impression, nudgekit:click, nudgekit:dismiss and nudgekit:response. Each one includes the campaign name, ID, type and survey score in event.detail. These fire even when forwarding is off.
Does NudgeKit store personal data?
It doesn't store emails, names, plans or traits. User IDs are scrambled before they're saved. Page visits, events and survey answers are kept until your retention window ends (90 days by default), then deleted automatically.
Will NudgeKit slow down my app?
No. The script loads asynchronously, makes one small request per page, and only draws something when a campaign matches.
Can a user see the same message over and over?
Only if you allow it. Every campaign has a limit on how many times one person sees it and a minimum gap between showings. Emails and webhooks are sent at most once per person.
Do I need my own email provider?
Yes, if you want lifecycle emails. Add a Resend API key and verify your sending domain. Already using Bento, Loops or something similar? Use a Webhook campaign instead and let that tool send the email.
How do I check that a webhook really came from NudgeKit?
Each request carries an X-NudgeKit-Signature header, an HMAC SHA-256 of the body made with your webhook secret. Compute it on your side and compare.
Why isn't my campaign showing?
Check that it's live and inside its start and end dates, that every condition matches (they all have to), that you haven't already hit the frequency limit, and that an ad blocker isn't stopping the script. Serving the widget from your own subdomain helps with ad blockers.
Is there a hosted version?
Not yet. NudgeKit is open source and self-hosted for now.