Diagnosing the browser SDK
When enabled, captured activity will be logged in the browsers console. A cookie will persist the setting.
Basic
There are two diagnostic modes that can be enabled.
If Seeka is running on a
localhostdomain, Seeka tracking will be disabled by default to prevent tracking of internal development environments. One of the below methods can be used to enable tracking onlocalhost.
Diagnosis - with tracking
With Seeka installed, navigate to the URL you wish to test and append ?test=full to the URL.
This will:
- Enable diagnosis mode for your browser session
- Show diagnostic stream in the browser
- Enables the Server streamer
- Enable event tracking requests to browser destinations
- Enable identity and event tracking sending to Seeka server side
Diagnosis - without tracking
With Seeka installed, navigate to the URL you wish to test and append ?test=diag to the URL.
This will:
- Enable diagnosis mode for your browser session
- Show event streamer in the browser
- Block event tracking requests to browser destinations
- Block identity and event tracking sending to Seeka server side
Advanced
Seeka SDK
One of the below methods can be used to enable debug mode for the Seeka SDK and all of the enabled plugins.
- By setting
config.debug.isEnabledtotrueorfalsewhen initialising the SDK - By running the below code in the browser's debug console.
Converge.debug.setEnabled(true); - By running the below code in the browser's debug console. This will toggle logging to verbose and setting debug mode.
The return value indicates whether dev mode has been enabled or not.
Converge.debug.toggleDevMode();
Debugging data sent to platforms
After enabling Seeka SDK debug mode as above, some platforms support viewing events live as they are sent by Seeka.
Google Analytics 4
This article explains how to use Google's "DebugView".
See "Monitor the events in DebugView" heading.
Meta/Facebook
This article explains how to test events.
Append the test_event_code query string parameter to the URL of the page you require testing and open the URL in your browser.
The value of this parameter should be the test event code sourced from the above link.
Example URL: https://www.example.com?test_event_code=TEST123
Controlling verbosity
- By setting
config.debug.minimumLevelwhen initialising the SDK. See values below. - By running the below code in the browser's debug console.
Converge.debug.setMinimumLevel("verbose");
Verbosity can be set to:
- verbose
- information
- warning
- error
Verbose logging should only be active if:
window.Converge.debug.toggleDevMode()is calledwindow.Converge.debug.isDebugEnabledistrue- Setting
config.debug.isEnabledtotrueorfalsewhen initialising the SDK window.Converge.debug.setEnabled(true)is called- window hostname is
localhost
Most of the debugging options will persist in either local storage or session storage.
Environment override
The SDK can be configured to target a specific environment. When set, the environment identifier is included in all requests to Seeka endpoints, enabling infrastructure-level routing.
Setting via SDK configuration
When initialising the SDK directly (e.g. via npm), pass the env property on the configuration object:
const converge = new ConvergeSdk({
key: "(public key)",
organisationId: "(Organisation ID)",
env: "(environment identifier)",
});Setting via the browser console
Use the debug helper to set the environment for the current browser. This persists in local storage and takes effect after the page reloads.
Converge.debug.setEnv("(environment identifier)");To remove the environment override and return to default routing:
Converge.debug.resetEnv();Setting via the data layer
The environment can also be set before the SDK tag loads by assigning it to the window.Seeka data layer:
<script>
window.Seeka = window.Seeka || {};
window.Seeka.env = "(environment identifier)";
</script>SDK version override
The SDK version served by Seeka endpoints can be overridden for testing. This is useful when validating changes on an alpha build before promoting to the latest stable release.
Setting via the browser console
Converge.debug.setSdkVersion("alpha");This persists in local storage and reloads the page. On reload, all Seeka endpoint requests (tag script, iframe, sidekick assets) will include the version override, causing the backend to serve the specified SDK version.
To return to the default SDK version:
Converge.debug.resetSdkVersion();Available version identifiers
alpha- the latest alpha pre-release buildlatest- the current stable release (default)- A specific version number (e.g.
1.9.34)
Checking installed version
Run the below code in the browser's debug console to see the version of the Seeka browser SDK installed on the site.
Converge.config.runtime;