diff --git a/lib/sgn-sdk.ts b/lib/sgn-sdk.ts index f4a4006a..1bbf5f27 100644 --- a/lib/sgn-sdk.ts +++ b/lib/sgn-sdk.ts @@ -65,11 +65,11 @@ if (isBrowser()) { if (apiKey) scriptConfig.apiKey = apiKey; + if (isStaging) scriptConfig.coreUrl = coreUrlStaging; + if (trackId && !isStaging) scriptConfig.eventTracker = new Tracker({trackId}); - if (isStaging) scriptConfig.coreUrl = coreUrlStaging; - config.set(scriptConfig); if (component === 'paged-publication-viewer') {