Skip to content

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.

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.

getAnalysis() examines a captured session across seven dimensions. Each covers one part of the session and should be read alongside the others.

DimensionWhat it measures
Content originThe share of text typed, pasted, dictated, autocompleted, or inserted without a known origin; individual paste events and subsequent rework.
Timing authenticityKey hold and inter-key timing, rhythm variability, periodicity, and entropy.
Revision behaviourCorrections, navigation, word substitutions, revision depth, and editing behind the forward edge of the document.
Session continuityTab-away periods and meaningful changes in behaviour during the session.
Physical plausibilityEvent sequences that are too fast, incomplete, untrusted, or otherwise inconsistent with a physical keyboard.
Temporal patternsPauses, bursts, speed changes, fatigue, warm-up, and active versus idle time.
Writing processHow 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.

Install WriteTrack and attach it to the field or editor your user writes in:

Terminal window
npm install writetrack
import { 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.

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.