@@ -11,33 +11,26 @@ import { EXPERIENCE_PLATFORM_WEB_SDK_PROD, EXPERIENCE_PLATFORM_WEB_SDK_STAGE } f
1111 * Currently stage only; prod injection is disabled below.
1212 */
1313function injectExperiencePlatformWebSDK ( ) {
14- console . log ( 'injectExperiencePlatformWebSDK' ) ;
1514 const head = document . head || document . documentElement ;
16- console . log ( 'head' , head ) ;
1715 if ( ! head ) return ;
1816
1917 const alreadyInjected = [ ...head . querySelectorAll ( 'script[src]' ) ] . some (
2018 ( s ) => s . src === EXPERIENCE_PLATFORM_WEB_SDK_PROD || s . src === EXPERIENCE_PLATFORM_WEB_SDK_STAGE ,
2119 ) ;
22- console . log ( 'alreadyInjected' , alreadyInjected ) ;
2320 if ( alreadyInjected ) return ;
2421
2522 // TODO: Enable Web SDK in prod — remove the next line and use the conditional below for script.src.
26- console . log ( 'isProd(experimentationConfig)' , isProd ( experimentationConfig ) ) ;
2723 if ( isProd ( experimentationConfig ) ) return ;
2824 const script = document . createElement ( 'script' ) ;
2925
3026 // script.src = isProd(experimentationConfig) ? EXPERIENCE_PLATFORM_WEB_SDK_PROD : EXPERIENCE_PLATFORM_WEB_SDK_STAGE;
3127 script . src = EXPERIENCE_PLATFORM_WEB_SDK_STAGE ;
3228
3329 script . async = true ;
34- console . log ( 'script' , script ) ;
3530 head . appendChild ( script ) ;
36- console . log ( 'script appended' ) ;
3731}
3832
3933async function initAnalytics ( ) {
40- console . log ( 'initAnalytics' ) ;
4134 try {
4235 injectExperiencePlatformWebSDK ( ) ;
4336 } catch ( error ) {
@@ -106,9 +99,3 @@ if (map) {
10699
107100document . dispatchEvent ( new Event ( 'delayed-phase' ) ) ;
108101Window . DELAYED_PHASE = true ;
109-
110- const testLoad = ( ) => {
111- console . log ( 'testLoad' ) ;
112- }
113-
114- testLoad ( ) ;
0 commit comments