Indax

Page context

Tell the API where the visitor is, for better ranking and answers.

A visitor on your pet food page who asks "which conveyor do you recommend?" wants the pet food answer. Send context with a search or a chat message and Indax uses it. Try it: set context.current.url in the Search playground.

{
  "session_id": "v_8f2c1",
  "current": { "url": "https://www.example.com/conveyors/pet-food/", "title": "Pet Food Conveying" },
  "trail": [{ "url": "https://www.example.com/industries/pet-food/", "at": "2026-12-02T15:02:40Z" }],
  "referrer": "https://www.google.com/"
}
FieldWhat it is
session_idYour id for the visit (≤100 chars). Chat limits count per session. No emails or names.
currentThe page the visitor is on: url, optional title.
trailEarlier pages, oldest first. The newest 20 are used.
referrer, utmWhere the visitor came from. Only the host is kept.

All fields are optional. Indax keeps only URLs on the company's own domain, reads the visit's topics from those pages, and then:

  • Search moves matching results up a little (context_applied: true). Send "boost": false to turn it off.
  • Chat uses the visit as background, never as instructions.

Collect it in the browser

<script>
  (function () {
    var t = JSON.parse(sessionStorage.getItem("indax_trail") || "[]");
    if (!t.length || t[t.length - 1].url !== location.href) t.push({ url: location.href, title: document.title, at: new Date().toISOString() });
    sessionStorage.setItem("indax_trail", JSON.stringify(t.slice(-20)));
    window.indaxContext = function () {
      return { current: { url: location.href, title: document.title }, trail: t.slice(0, -1), referrer: document.referrer || undefined };
    };
  })();
</script>

Then send context: window.indaxContext() with each search or chat message. sessionStorage clears when the tab closes; no cookies. If your visitors must opt in to analytics, send context only after they do.

On this page