KERNIT Documentation

API version2026-05-12Version policy

Feedback and Search Analytics

KERNIT docs expose lightweight browser events for search, playground use, endpoint responses, and page feedback so the documentation can keep improving from real developer signals.

Browser Event Contract#

The static docs emit a kernit-docs-event browser event, keep the last events in localStorage.kernit_docs_events, and send the same sanitized event to /api/docs-events for durable product analytics.

Event typeWhen it firesTypical fields
searchA docs search query is evaluated.query, results
feedbackA user clicks Yes or No on page feedback.value, page
playground_submitA per-endpoint request builder is submitted.endpoint, method
playground_responseThe request builder receives a response.endpoint, status
playground_errorThe request builder fails before a response.endpoint, message

Integration Example#

window.addEventListener('kernit-docs-event', (event) => {
  console.log(event.detail.type, event.detail.path, event.detail.detail);
});

Durable Event Sink#

The production event sink accepts only docs paths, docs event types, and whitelisted fields such as endpoint, status, search query, result count, and feedback value. It rejects invalid JSON, rejects non-docs paths, redacts credential-looking strings, and does not send API keys, files, or request bodies.

Why This Exists#

Good developer docs improve from search misses, endpoint testing friction, and page-level feedback. These hooks give KERNIT a practical feedback surface while keeping the docs fully static and crawlable.

Was this page useful?Send a lightweight docs feedback event.
Last updated: May 12, 2026Canonical: https://kernit.org/docs/api/feedback-analytics/