Using the following method, you can run callback when a UserGuiding preview start;
window.userGuidingLayer.push({
event: 'onPreviewStart',
fn: _YOUR_FUNCTION_HERE_
})
example call
window.userGuidingLayer.push({
event: 'onPreviewStart',
fn: (data) => console.log(data)
})
example output (logs to console)
{
guideId: 123456
}
See other available methods;