Licensing
How It Works
Section titled “How It Works”WriteTrack validates license keys locally using cryptographic signature verification. Validation requires a secure context: serve production pages over HTTPS. Localhost is treated as a secure context.
- Capture:
start(),getData(), and the event methods are available in every license state. - Production analysis:
getAnalysis()requires a valid license key. - Local evaluation: analysis is available on
localhostand127.0.0.1.
Getting a License Key
Section titled “Getting a License Key”Option 1: CLI (recommended)
Section titled “Option 1: CLI (recommended)”npx writetrack initThe CLI prompts for your email and production domain, registers a free 28-day trial, and saves the key to .env:
WriteTrack — Set up a free 28-day trial
Email address: you@example.comProduction domain (e.g. example.com): example.com
Registering you@example.com for example.com...
Done — license key saved to .env Trial expires: 3/10/2026For CI or scripted setup, pass the values as flags (this also skips the save prompt) or pipe them on stdin — email first, then domain:
npx writetrack init --email you@example.com --domain example.com# orprintf 'you@example.com\nexample.com\n' | npx writetrack initnpx writetrack --help shows usage without registering anything; unknown
arguments are rejected.
Option 2: Web portal
Section titled “Option 2: Web portal”Sign up at the customer portal to get a key and manage your account.
Using Your Key
Section titled “Using Your Key”Treat the key as public client configuration bound to a domain. Expose it through your framework’s public/client environment-variable mechanism, then pass that string when initializing:
function createTracker(target: HTMLElement, licenseKey: string) { return new WriteTrack({ target, license: licenseKey });}Domain Binding
Section titled “Domain Binding”Each license key is bound to a production domain. The SDK validates that the current hostname matches the licensed domain. Subdomains are included — a key for example.com works on app.example.com, staging.example.com, etc.
Expiration
Section titled “Expiration”Renew a trial or subscription before it expires to keep analysis available. An expired key logs a console warning; capture methods are unaffected either way.
Evaluation Mode
Section titled “Evaluation Mode”On localhost, no key is needed. This is the easiest way to try WriteTrack:
// Full analysis on localhost — no license requiredconst tracker = new WriteTrack({ target: textarea });tracker.start();
const analysis = await tracker.getAnalysis(); // works on localhost