Plain HTML and any backend
The two script lines, and what any backend needs to produce for identify().
Anonymous only (answers and recommendations)
Two lines before </body>:
<script>window.Actessia=window.Actessia||{q:[]};["identify","track","setContext","escalate","open","close","reset"].forEach(function(m){window.Actessia[m]=function(){window.Actessia.q.push([m,[].slice.call(arguments)])}});</script>
<script async src="https://cdn.actessia.ai/v1/actessia.js" data-site-key="ak_site_…"></script>
That is a working install. Visitors get answers with sources and recommendations from your catalog; nobody gets tools.
Adding actions
Any backend can sign an identity: HMAC-SHA256 over "actessia-identify-v1\n" + canonical_json(payload)
with the site's secret, where canonical JSON is RFC 8785. The identify() page
has verified implementations in Node, Python, PHP and Ruby, and the exact string to sign for a
test vector. Serve the { payload, signature } pair from an endpoint only signed-in users can
reach, fetch it on the page, and call:
fetch("/actessia/identify").then((r) => r.json()).then((s) => s && Actessia.identify(s.payload, s.signature));
Call Actessia.reset() on logout.