03.01.2024 07:02:34
Paste this script into the console
After which all events that are called, for example, when a button is clicked, will be logged!
Code |
---|
let originalBxOnCustomEvent = BX.onCustomEvent; BX.onCustomEvent = function (eventObject, eventName, eventParams, secureParams) { let logData = { eventObject: eventObject, eventName: eventName, eventParams: eventParams, eventParamsClassNames: [], secureParams: secureParams }; for (var i in eventParams) { let param = eventParams [i]; if (param !== null && typeof param == 'object' && param.constructor) { logData['eventParamsClassNames'].push(param.constructor.name) } else { logData['eventParamsClassNames'].push(null); } } console.log(logData); originalBxOnCustomEvent.apply(null, [eventObject, eventName, eventParams, secureParams]); } |