AI Writing Detection
WriteTrack is a client-side JavaScript SDK for developers adding AI-writing detection to their own applications. It records typing, pastes, revisions, dictation, autocomplete, pauses, cursor movement and programmatic changes as they happen inside the editor.
The output is a session report your product can store, query and show to a reviewer.
Why analyse the writing process?
Section titled “Why analyse the writing process?”Text-only AI detectors analyse completed prose; copying, rewriting, translation and editing erase the record of how text entered the document.
WriteTrack collects that record at the point of entry. Reviewers can compare a paragraph developed over twenty minutes with one added in a single paste, autocomplete event, dictation event or mechanically regular input sequence. Capture and analysis run locally in the browser.
The seven analysis dimensions
Section titled “The seven analysis dimensions”getAnalysis() examines a captured session across seven
dimensions. Each covers one part of the session and should be read alongside
the others.
| Dimension | What it measures |
|---|---|
| Content origin | The share of text typed, pasted, dictated, autocompleted, or inserted without a known origin; individual paste events and subsequent rework. |
| Timing authenticity | Key hold and inter-key timing, rhythm variability, periodicity, and entropy. |
| Revision behaviour | Corrections, navigation, word substitutions, revision depth, and editing behind the forward edge of the document. |
| Session continuity | Tab-away periods and meaningful changes in behaviour during the session. |
| Physical plausibility | Event sequences that are too fast, incomplete, untrusted, or otherwise inconsistent with a physical keyboard. |
| Temporal patterns | Pauses, bursts, speed changes, fatigue, warm-up, and active versus idle time. |
| Writing process | How the session moves between planning, drafting, and revision phases. |
The Analysis Reference documents every field and the Analysis guide explains the indicator codes and usage patterns.
Add it to a submission flow
Section titled “Add it to a submission flow”Install WriteTrack and attach it to the field or editor your user writes in:
npm install writetrackimport { WriteTrack, summarizeAnalysis } from 'writetrack';
const tracker = new WriteTrack({ target: document.querySelector<HTMLTextAreaElement>('#essay')!,});
tracker.start();
async function finishSubmission() { tracker.stop(); const report = await tracker.getSessionReport();
if (!report.analysis) { throw new Error('Writing-process analysis is unavailable'); }
const summary = summarizeAnalysis(report.analysis);
await fetch('/api/submissions', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ report, summary }), });}summary contains stable fields for list views, queries, and thresholds,
including effort ratio, typed and pasted percentages, largest paste,
corrections, tab-aways, and active writing time. Keep the complete report for
reviewers who need the underlying timeline and indicators. See
Storing & Querying Reports for database schemas and
indexing patterns.
Data flow
Section titled “Data flow”Capture and analysis run in the browser. Network requests occur through output sinks you configure. Raw session data can contain the text that was typed or pasted, so your application still needs an appropriate consent, retention and access policy. The Privacy & Security guide lists every captured field and the content-bearing fields to treat as sensitive.