Browser SDK hooks

Hooks provide an integration point allowing listening for certain events that occur within the SDK.

Hook types

TypeDescriptionHook detail properties
converge.sdk.init.startFires when the SDK is starting to initialise.None
converge.sdk.readyFires when the SDK is finished loading.None
converge.sdk.ready.instanceFires when an instance in a multi-instance setup has finished loading.scope - detail of the instance
converge.activity.trackedFires when an activity is tracked.activityName - name of the activity

activity - activity payload (nullable)

props - common properties (nullable)

metadata - additional metadata (nullable)

scope - detail of the instance
converge.identity.changedFires when the user identity has changed by either Seeka detecting a change in the profile or when issuing a new profile for a new website visitor.profileChangeCounter - count of profile changes

identifiers - identity profile
converge.privacy.state.changedFires when the privacy consent state changesnewState - the current privacy state
oldState - the old privacy state

Usage

<script>
  window.addEventListener("converge.identity.changed", function (ev) {
    console.log("Identity has changed!", ev.detail.identifiers);
  });
</script>