Use multiple instances

Learn how to interact with the Seeka Browser SDK when multiple instances are configured.

Terms

  • Instance ID (scopeKey) - the unique identifier for each Seeka instance. This is the Instance ID shown in your API settings when the correct brand is selected. Used to access a single instance via Converge.instances["instanceId"].
  • Scope description (scopeDescription) - a human-readable name for the instance, usually the brand name.

Interacting with the SDK

All instances at once

Fire a tracking event or identity update to every installed instance with a single call. Useful when an action (like a page view or login) should be recorded across all brands.

Only these operations support all-instance dispatch:

  • Converge.track (all methods)
  • Converge.debug (all methods except isEnabled())
  • Converge.identity.mergeProfile()
// Track a page view across all instances
Converge.track.viewPage();

// Merge identity across all instances
Converge.identity.mergeProfile({
  firstName: ["John"],
  lastName: ["Smith"],
  email: ["john.smith@example.com"],
  phone: ["+61400111222"],
});

// Toggle dev mode for all instances
Converge.debug.toggleDevMode();

A single instance

Access a specific instance by its Instance ID via Converge.instances["instanceId"]. Each instance has the full SDK API.

See method reference for all available methods.

// Replace with your actual Instance IDs from https://seeka.app/settings/integrations/api
const BRAND_A = "3323ba69b19e4261a3fbd3f5d998f118";
const BRAND_B = "e4d0e807de71404e9b2a6f82bfcec551";

// Get the person ID for Brand A
console.log(Converge.instances[BRAND_A].identity.getProfile().seekaPId);

// Track a page view for Brand A only
Converge.instances[BRAND_A].track.viewPage();

// Track an order for Brand B only
Converge.instances[BRAND_B].track.order({
  orderId: "ORD-123",
  totalPrice: 99.95,
  currency: "AUD",
});

// Merge identity for Brand B only
Converge.instances[BRAND_B].identity.mergeProfile({
  email: ["john.smith@example.com"],
});

Hooks

When hooks are fired, a scope property is included in the event detail indicating which instance the hook originated from.

  • converge.sdk.ready.instance fires for each instance as it becomes ready.
  • converge.sdk.ready fires once all instances are ready.
window.addEventListener("converge.sdk.ready.instance", (event) => {
  console.log("Instance ready:", event.detail.scope.key);
});

window.addEventListener("converge.sdk.ready", () => {
  console.log("All instances ready");
});