To measure this time period, you can can set a variable to the current time just before the <script> tag that loads the SDK and, in the onSherpaEvent, subtract that time variable from the new current time. This will provide you with the load time in milliseconds.
Please see the code snippet below for an example:
<script> const startLoadTime = (new Date()).getTime(); function onSherpaEvent(event) { if (event.type === 'sdkLoaded') { console.log('Time to load: ', (new Date()).getTime() - startLoadTime)); } } </script> <script src="https://sdk.joinsherpa.io/widget.js?appId=APP_ID"></script>