// 1. Event Listener for Window Load window.addEventListener('load', function() { initTracer(); }); // This ensures all DOM elements and resources are loaded before initialization // 2. Error Handling and Debug Mode function initTracer() { try { var tracer = new Tracer({ websiteId: "1f7a6d7d-866c-4ab1-b2aa-3e86c65ece4c", async: true, debug: true // Enables console logging for debugging }); } catch(e) { console.error('Tracer initialization error:', e); } } // 3. Script Loading // Place the script tag at the bottom of
// 'async' loads the script asynchronously // 'defer' ensures the script executes after HTML parsing