Back to Docs
60-second install

Quickstart

Add Threadline Comments to any website in three steps. No build tools, no framework lock-in.

01

Get your Site ID

Sign up at threadline.io/signup, create a site in the dashboard, and copy the data-site-id value from Site Settings. It is a 64-character hex string.

02

Add the embed code

Paste this into your HTML. Load the <script> from your <head> (or just before </body>) and place the <div> where comments should appear.

embed.html
<div id="threadline-comments"></div>
<script src="https://threadline.io/api/embed"
  data-site-id="YOUR_SITE_ID"
  data-api-url="https://api.threadline.io"
  async></script>
03

Done

Load your page. The widget appears at the <div> location. Visitors can comment without leaving your site.

Using Next.js, Astro, or WordPress? See embed options for framework-specific instructions.

Troubleshooting

Something not loading?

Most install issues are Site ID, CSP, or mount-node problems. Work through these in order.

Widget does not appear

Confirm the mount node #threadline-comments is in the DOM. Prefer placing the mount before the script tag. The embed keeps watching for a late mount (SPA/hydration), so a hard refresh should not be required. Confirm data-site-id is your real Site ID — not YOUR_SITE_ID. Check the browser Network tab that /api/embed returns 200.

Invalid site or empty thread

The Site ID must match a site in your dashboard, and the page hostname should match a domain you have verified for that site. Localhost is fine for development if you have added it in Site Settings.

Script blocked by CSP

Allow your Threadline app origin in script-src, and the app + Comments API in connect-src (include wss: for the API host for live updates). Shadow DOM styles need style-src 'unsafe-inline' (or a nonce if you inject styles yourself). The Socket.IO client is served from your Threadline origin at /widget/socket.io.min.js — you do not need to allow cdn.socket.io. Prefer Easy install (first-party rewrites) when CSP is strict.

API calls fail (CORS / 401)

Keep data-api-url pointed at the Comments API (https://api.threadline.io). Do not omit it when the embed script and API are on different origins. A wrong Site ID also shows up as auth failures in the console.

Styles look broken or missing

The widget renders in Shadow DOM - host-page CSS will not style it (by design). Use theme attributes or CSS custom properties on the mount node. See themes and Shadow DOM isolation.

Works locally, blank in production

Common causes: production CSP, an ad blocker filtering comment scripts, a CDN caching an old HTML shell without the embed, or the Site ID from a different environment. Hard-refresh and compare Network requests side-by-side with localhost.