window._track_queue = { ...window._track_queue, paypal_button_js: { load_status : null } }; function paypalLoad(event) { event = event || window.event || arguments.callee.caller.arguments[0]; if (!event) return; const { type, target } = event; window._track_queue.paypal_button_js.load_status = type === 'error' ? 'failed' : 'success' window._track_queue.paypal_button_js.src = target && target.src }