Docs
Margin is one line of HTML. Here's everything.
1. Get your site key
Get an instant embed from the homepage — no account needed — or create an account. Either way you get an 8-character key.
2. Paste the embed
Drop this wherever you want the comments to appear (e.g. at the end of a blog post):
<script src="https://margin.perch-app.workers.dev/embed.js" data-site="YOUR_KEY" defer></script>
That's it. Margin renders a comment thread and a "leave a note" form right there.
Cautious about pasting a third-party script? Good instinct. Here's exactly what this embed does — ~11 KB, Shadow-DOM isolated, no cookies, no trackers, talks only to Margin. The source isn't minified; read every line.
Guestbook vs. per-page comments
By default, each page URL gets its own thread — so every blog post has its own comments. To make a single shared guestbook (one thread across your whole site), pin the page key:
<script src="https://margin.perch-app.workers.dev/embed.js" data-site="YOUR_KEY" data-page="guestbook" defer></script>
Feedback board mode
Add data-mode="feedback" to turn the widget into an upvotable feedback board: visitors post feature requests or bug reports and upvote existing ones (no login), and the most-wanted ideas float to the top. Optionally set a heading with data-title. From your dashboard you can tag any idea Planned, In progress, or Done — the status badge then shows on the board, giving you a public roadmap for free.
<script src="https://margin.perch-app.workers.dev/embed.js" data-site="YOUR_KEY" data-page="board" data-mode="feedback" data-title="Feature requests" defer></script>
Options
data-site (required) your 8-char site key data-page (optional) thread key; defaults to the page path data-mode (optional) comments | feedback (feedback = upvotable board) data-title (optional) heading shown above the widget data-theme (optional) auto | light | dark (default: auto)
Moderation
In your dashboard you can switch a site between publish immediately and approve before publish, and approve or remove any comment. A hidden honeypot field and per-IP rate limits stop most bots without ever showing your readers a CAPTCHA.
Notifications
In a site's Settings, paste a Discord, Slack, or generic webhook URL. Every new comment posts a short message to it instantly — so you find out the moment someone leaves a note instead of checking a dashboard. Generic webhooks receive a JSON payload (event, site, page, author, body, status). Leave the field blank to turn it off.
Privacy
No third-party scripts are loaded. We store the comment, a name if given, and a one-way hash of the commenter's IP (for rate-limiting only). Nothing else.