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.
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.
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.
AI features should be cheap to run and impossible to break a site with. Every personalization endpoint ships with:
Each unique visitor context is cached for 1–720 hours. You can purge expired entries or the whole cache from the admin.
Every OpenAI call is logged to ai_usage. When you hit the limit, the endpoint returns 'quota_exceeded' and shows defaults — no surprise bills.
AI_KILL_SWITCH=1 short-circuits every personalization call before it touches OpenAI.
Timeout, JSON parse error, quota or rate-limit failure — every code path returns your default copy. We never 500 on the visitor.
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.