AI personalization

Show every visitor the right copy — automatically.

TrackPilot rewrites your popup headline, CTA and on-page hero text based on how the visitor arrived: organic search, paid ads, social, email or direct. Same form, same offer — copy tuned to the moment.

Popup personalization

The tracker calls /personalize/popup on view with the visitor's channel, search query and campaign. We return a rewritten headline, subheadline and CTA tailored to that context — cached so the next matching visitor gets it instantly.

On-page text swap

Add data-tp-personalize to any element. We swap the text post-load, never blocking first paint, and only if the original text still matches the registered fallback — so editor changes are never clobbered.

Guardrails on by default

AI features should be cheap to run and impossible to break a site with. Every personalization endpoint ships with:

24-hour cache (configurable)

Each unique visitor context is cached for 1–720 hours. You can purge expired entries or the whole cache from the admin.

Per-org monthly quota

Every OpenAI call is logged to ai_usage. When you hit the limit, the endpoint returns 'quota_exceeded' and shows defaults — no surprise bills.

Master kill switch

AI_KILL_SWITCH=1 short-circuits every personalization call before it touches OpenAI.

Safe fallback path

Timeout, JSON parse error, quota or rate-limit failure — every code path returns your default copy. We never 500 on the visitor.

Brand-aware drafting

Point the brand scraper at your URL and we extract your logo, primary colors and tone of voice (with SSRF guards, an 8s timeout and a body-size cap). Every AI draft — popup copy, email subject, hero rewrite — uses that brand profile so it actually sounds like you.