Use multiple instances
Learn how to interact with the Seeka Browser SDK when multiple instances are configured by following this guide.
Terms
scopeKey
- A unique identifier for each instance. This is used to access the SDK of a single instance. ID of instance.scopeDescription
- A human friendly name to identify the instance. Usually the name of the brand associated with the converge instance.
Interacting with SDK
For all instances
Multi-instance firing is useful for tracking events and identities via single SDK method call and having that call permeate through all installed Seeka instances.
It is possible to interact with all installed instances with a single method call but only a subset of the SDK functionality can be utilised in this manner.
This is limited to the following operations:
Converge.track
(all child methods)Converge.debug
(all child methods exceptisEnabled()
)Converge.identity.mergeProfile()
// Tracks a page view across all instances
Converge.track.viewPage();
// Merges the profile across all instances
Converge.identity.mergeProfile({
firstName: ["John"],
lastName: ["Smith"],
email: ["john.smith@companydomain123.com"],
phone: ["+61400111222"],
});
// Toggles dev mode for all instances
Converge.debug.toggleDevMode();
For a single instance
Single instance firing is useful for tracking events and identities for a specific instance or when full SDK access is required for methods not supported by the multi-instance firing
Each instance has the full capability and functionality of the SDK when accessed as below.
See methods for a complete reference of the SDK methods.
// Gets the profile / person / identity ID for instance with the scopeKey 3323ba69b19e4261a3fbd3f5d998f118
console.log(Converge.instances["3323ba69b19e4261a3fbd3f5d998f118"].identity.getProfile().seekaPId);
// Tracks a page view for only the instance with the scopeKey 3323ba69b19e4261a3fbd3f5d998f118
Converge.instances["3323ba69b19e4261a3fbd3f5d998f118"].track.viewPage();
// Toggles dev mode for only the instance with the scopeKey 3323ba69b19e4261a3fbd3f5d998f118
Converge.instances["3323ba69b19e4261a3fbd3f5d998f118"].debug.toggleDevMode();
// Tracks a page view for only the instance with the scopeKey e4d0e807de71404e9b2a6f82bfcec551
Converge.instances["e4d0e807de71404e9b2a6f82bfcec551"].track.viewPage();
// Merges the profile for only the instance with the scopeKey e4d0e807de71404e9b2a6f82bfcec551
Converge.instances["e4d0e807de71404e9b2a6f82bfcec551"].identity.mergeProfile({
firstName: ["John"],
lastName: ["Smith"],
email: ["john.smith@companydomain123.com"],
phone: ["+61400111222"],
});
Hooks
When hooks are fired, a scope
property will be included in the event detail which signals the instance the hook originated from.