Added tracking event

dispatch the event "scriptComplete" to call the function to end the
loading.