<script> tag. Paste it into your HTML once and the widget appears on every page that loads that file. You’ll find your project token in the NOCK Dashboard under Settings → Widget.
The snippet
Copy the snippet below, replaceYOUR_PROJECT_TOKEN with the token from your Dashboard, and paste it just before the closing </body> tag of your HTML.
Your project token is unique to each project. If you have multiple projects in NOCK, make sure you copy the token for the correct one.
Attribute reference
| Attribute | Required | Description |
|---|---|---|
data-token | Yes | Your project token, found in Settings → Widget in the Dashboard. |
data-api-base | No | The NOCK API base URL. Defaults to https://nocknock.cloud — you only need to set this if you are on a custom domain plan. |
Framework examples
Plain HTML
Add the snippet inside your main layout file or any HTML page where you want the widget to appear, just before</body>.
Next.js (App Router — layout.tsx)
In the App Router, add the script to your root app/layout.tsx so it loads on every page. Use Next.js’s built-in <Script> component with strategy="lazyOnload" to avoid blocking the main thread.
Next.js (Pages Router — _document.tsx)
If you use the Pages Router, add the script to your custom _document.tsx inside the <body> element.
Nuxt (app.vue)
In a Nuxt project, use the useHead composable (or the <Head> component) to inject the script globally from app.vue.
CMS and website builders
Verifying the installation
Once you’ve added the snippet, open your site in a browser. The NOCK feedback button should appear in the corner of the page. Click it to open the widget and submit a test ticket — then check your Dashboard to confirm the ticket arrived.Configure the Widget
Customize the button’s appearance, position, categories, and behavior from the Dashboard.
Troubleshooting
Widget not showing up? Step through common installation problems.