File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,20 +14,25 @@ function injectExperiencePlatformWebSDK() {
1414 const head = document . head || document . documentElement ;
1515 if ( ! head ) return ;
1616
17+ console . log ( 'head' , head ) ;
1718 const alreadyInjected = [ ...head . querySelectorAll ( 'script[src]' ) ] . some (
1819 ( s ) => s . src === EXPERIENCE_PLATFORM_WEB_SDK_PROD || s . src === EXPERIENCE_PLATFORM_WEB_SDK_STAGE ,
1920 ) ;
21+ console . log ( 'alreadyInjected' , alreadyInjected ) ;
2022 if ( alreadyInjected ) return ;
2123
2224 // TODO: Enable Web SDK in prod — remove the next line and use the conditional below for script.src.
25+ console . log ( 'isProd(experimentationConfig)' , isProd ( experimentationConfig ) ) ;
2326 if ( isProd ( experimentationConfig ) ) return ;
2427 const script = document . createElement ( 'script' ) ;
2528
2629 // script.src = isProd(experimentationConfig) ? EXPERIENCE_PLATFORM_WEB_SDK_PROD : EXPERIENCE_PLATFORM_WEB_SDK_STAGE;
2730 script . src = EXPERIENCE_PLATFORM_WEB_SDK_STAGE ;
2831
2932 script . async = true ;
33+ console . log ( 'script' , script ) ;
3034 head . appendChild ( script ) ;
35+ console . log ( 'script appended' ) ;
3136}
3237
3338async function initAnalytics ( ) {
You can’t perform that action at this time.
0 commit comments