Skip to main content

Namespace

Use a custom namespace when multiple applications on the same domain each run the Adtrace Web SDK. Namespaces keep SDK storage separate so data does not mix between apps.

Set namespace in Adtrace.initSdk before the first session.

Parameter

ParameterTypeDescription
namespacestringCustom storage namespace for this application.

Example

Adtrace.initSdk({
appToken: '{YourAppToken}',
environment: 'production',
namespace: 'my-web-app',
});
Important

You can migrate existing default storage to a custom namespace and data will be preserved. After a custom namespace is set, renaming it causes data loss.