Netlify
Connect Netlify and pick the site: no code change, deploy previews included.
Connect Netlify
- In CommentKit, open Workspace → Integrations, choose Netlify and connect your Netlify account.
- Open Project → Integrations and pick the Netlify site for this project.
- Deploy the site (or wait for its next deploy). From then on every page has CommentKit.
No code change and no package. If Netlify is not listed under Integrations, it has not been switched on for this CommentKit server yet; use the script tag instead.
What it changes
- It adds the CommentKit script tag to the site as a Netlify snippet (Site configuration → Build & deploy → Post processing → Snippet injection), so every deploy and deploy preview gets the widget.
- It adds the site’s address and its custom domain to the project’s allowed websites in Project → Setup. Add deploy preview addresses there one by one (a wildcard on netlify.app is not allowed, because anyone can host a site there).
- Visitors on the live site still do not see the widget until they open a client link, follow a CommentKit email or press Ctrl/Cmd + Shift + K.
Branches
The injected tag does not set data-branch, so feedback from deploy previews is not filed per branch. To record the branch, add the script tag to your site yourself with data-branch set from Netlify’s BRANCH variable at build time, and remove the site from Project → Integrations.
Turning it off
Remove the site in Project → Integrations, or disconnect Netlify in Workspace → Integrations. CommentKit removes its snippet from the site; deleting the project does the same.