GET /v1/script/status tells you whether the Knock2 tracking script is successfully installed and receiving real traffic. Use it to confirm a new installation is working, power an in-app setup checklist, or alert your team if the script goes silent. Knock2 considers a script “installed” when at least one unique non-localhost visitor IP has been recorded in the last 7 days.
You can call this with the per-tenant API key returned by
POST /v1/tenants, or with your parent API key plus X-Knock-Tenant (or ?product_slug=) to check a direct child’s status without switching keys — see Reading a Child Tenant’s Data.Endpoint
Request Parameters
string
Read a direct child tenant’s status instead of your own (multi-tenant partners only). The
X-Knock-Tenant header takes precedence if both are supplied.string
Same as
product_slug above, as a header instead of a query param. Naming a slug that isn’t a direct child of your key returns 404, never 403.Example Requests
Response
A successful request returns200 OK with a ScriptStatusResponse body.
boolean
true when at least one unique non-localhost visitor IP has been recorded in the last 7 days, indicating the script is live and receiving traffic. false if no qualifying visits have been seen in that window.integer
The raw count of unique visitor IPs recorded in the last 7 days. This count includes all unique sessions regardless of whether the visitor was successfully identified.
string | null
ISO 8601 timestamp of the most recent visit recorded by the tracking script. Returns
null if no visits have been recorded yet.Troubleshooting
Ifis_installed is false after you have added the script tag to your site:
- Confirm the
<script>tag appears in the rendered HTML of a live page (not just in your source editor). - Check that the script’s
srcURL matches the/install/{your_tenant}/prodpath returned byGET /v1/scriptfor this key. - Wait a few minutes after the first page load — there may be a short propagation delay.
- Ensure the page has been visited from a non-localhost IP address. Local development traffic is excluded.