TrueStory

API

On your pages

<script src="https://harrowsoft.com/truestory/s/SITE_KEY.js" async></script>

TrueStory.identify("user-1", {displayName: "Rosa"});
TrueStory.event("Upgraded", {plan: "Pro"});
TrueStory.consent(true);   // if you've turned on waiting for consent
TrueStory.keep();          // in only-when-something-goes-wrong mode: keep this session

FullStory's and Hotjar's calls work too: FS.identify, FS.event, FS("setIdentity", ...), FS("trackEvent", ...) and hj("identify", ...), hj("event", ...). To mask something, use data-ts-mask, .fs-mask or data-hj-mask. To leave something out, use data-ts-block, .fs-exclude, .rr-block or data-hj-suppress. To show something in all-text mode, use data-ts-unmask, .fs-unmask or data-hj-allow.

Managing it from a script

Make a token on your tokens page, and send it as Authorization: Bearer hs_.... It can do what you can, no more.

GET /problemsWhat's going wrong, worst first.
GET /sessionsonly (wrong, starred), q, path, kind, selector, label, before.
GET /session/{id}One, with its moments and pages.
GET /session/{id}/chunk/{seq}A piece of the recording: rrweb events, gzip encoded.
PATCH /session/{id}star.
DELETE /session/{id}Removes it for good, for when someone asks to be forgotten.
POST /session/{id}/summaryWhat happened, in a sentence or two.
GET /pagesPages by sessions.
GET /pagepath. Clicks, scroll depth and problems on one page.
GET /funnelsYour funnels, with results.
POST /funnelsname, steps.
GET /funnel/{id}One, with who dropped at each step.
GET /setupSite key, privacy and what's kept.
PUT /setupprivacy, mask, block, mode, sample, retain_days, boring_days, need_consent. Admins only.