There are a couple of ways to execute your functions when UserGuiding code is loaded. 

First one is to push an  onload  event to userGuidingLayer as below. We'll execute this command when UserGuiding application is loaded. This is the suggest method.

  event: 'onload',

Another one is to set a variable called  onUserGuidingLoad  explicitly to window.

window.onUserGuidingLoad = _YOUR_FUNCTION_HERE_

Did this answer your question?