Hi Vikas,
Glad to hear "DOM Content Loaded" addresses the end event issue.
Scripting level 2 means steps that are marked as level 2 will run as well. I think it is better spotting which step level 2 needs to be changed to level 1 and then run the script in level 1. Running the script in level is mroe likely to fail.
Regarding the failure in Performance Center, it is probably a different issue. Do you happen to have a function library in the script? We have seen cases where function library is not being uploaded to Performance Center.
Regards,
Shlomi