Zeotap Interact SDK Test

Interact
Initializing... Polling storage...

The Interact SDK fetches targeting parameters from the server and stamps them on the page via four channels. All four are populated on every successful interaction fetch. Official Docs ↗

1. Callback — window.zeoParamsCallback(data)

Called by the SDK when targeting parameters arrive. Define it before the SDK loads to avoid missing the first invocation.

window.zeoParamsCallback = function(targetingParameters) {
  // targetingParameters is a key-value object, e.g.
  // { segment_membership: ["seg_1", "seg_2"], interest: "sports" }
  console.log("Interact data:", targetingParameters);
};

2. localStorage — zeoParamsStoreLocal

Persists across page reloads and tabs on the same origin.

var raw = localStorage.getItem("zeoParamsStoreLocal");
if (raw) {
  var params = JSON.parse(raw);
  console.log(params);
}

3. sessionStorage — zeoParamsStoreSession

Scoped to the current tab. Cleared when the tab closes.

var raw = sessionStorage.getItem("zeoParamsStoreSession");
if (raw) {
  var params = JSON.parse(raw);
  console.log(params);
}

4. Global Variable — window.zeoParamsGlobal

Set as a property on window after each interaction fetch. Available immediately in page scripts.

if (window.zeoParamsGlobal) {
  console.log(window.zeoParamsGlobal);
}

Summary

Channel Key / Accessor Lifespan Scope
Callback window.zeoParamsCallback(data) Real-time Current page
localStorage zeoParamsStoreLocal Persistent All tabs, same origin
sessionStorage zeoParamsStoreSession Session Current tab only
Global variable window.zeoParamsGlobal Page lifetime Current page
The SDK re-fetches interactions on SPA navigations (hooks pushState / replaceState / popstate), so all four channels are refreshed automatically on route changes.

Set User Identities

Set first-party identifiers that Interact uses for profile lookups. The key must match the identifier field name configured in your API source.

Raw JSON Mode

Storage Viewer

No interact data in localStorage yet
No interact data in sessionStorage yet
No zeoParamsGlobal data yet

zeoParamsCallback Received

Waiting...
The Interact SDK calls window.zeoParamsCallback(data) when targeting parameters are ready. Each invocation is logged below.
No callbacks received yet. Set identities to trigger an interact lookup.

Interaction Log

Live interaction data (all sources) 0
Waiting for interact data...
Set identities and interact data will appear here.

Network Capture

Captures XHR/fetch calls to /api/interact/interactions and logs request + response.

No network requests captured yet