Skip to content
Docent Docs

Web Admin

Documentation insights

Find the gaps in your help center without following individual readers.

Documentation insights

Docent's optional insights turn ordinary help-center activity into a practical editing list. The dashboard shows popular pages and searches, searches that do not lead to a result click, unanswered Assistant questions, and answers readers marked as unhelpful. Everything can also be exported as CSV.

Enable the categories you want in config/docent.php:

php
'insights' => [
    'enabled' => true,
    'categories' => [
        'pages' => true,
        'search' => true,
        'assistant' => true,
    ],
    'retention_days' => 90,
    'store_query_text' => true,
    'redact_query_text' => true,
],

Publish and run Docent's migrations, then open Insights from the admin top bar. The existing viewDocentAdmin gate protects the dashboard and its export.

What Docent keeps

The event schema is intentionally narrow. It stores page slugs, reader or widget surface, search and question text with common sensitive patterns redacted, result slugs, Assistant status and citation slugs, and thumbs feedback. A search counts once per session: while a reader refines a query, Docent updates the same search event, so reports reflect finished questions rather than keystroke prefixes. It does not store user IDs, IP addresses, sessions, conversation IDs, referrers, user agents, permission context, or generated answers.

Set store_query_text to false to leave search and question text out entirely. Assistant's older question log is configured separately with ai.log_questions; disable that too when no raw Assistant questions should be retained.

Browser events

The full docs and in-app widget also emit the same docent:analytics browser event for host applications that need their own integration. Its detail contains schema: 1, surface (reader or widget), the event name, and only the fields relevant to that event.

js
window.addEventListener('docent:analytics', ({ detail }) => {
    console.log(detail.event, detail.surface);
});

The documented events are page_viewed, search_submitted, search_results_impressed, search_result_clicked, search_no_click, assistant_outcome, assistant_feedback, and assistant_citation_clicked. Listening is optional and does not change Docent's first-party collection switches.

Retention

Schedule the pruning command at the same cadence as the rest of your Laravel maintenance:

php
use Illuminate\Support\Facades\Schedule;

Schedule::command('docent:insights:prune')->daily();

The command removes events older than retention_days. Pass --days=30 for a one-off override. On a multi-site install it prunes every site; add --site=docs to prune one. Events carry a site column, and each site's dashboard shows only its own.