LMSCommit() isn't the way to go here. How are you handling the "return to last page" thing? You might have to save the badges as cookies, since I do not believe Lectora supports access to custom fields. Alternatively you could use xAPI but that's a huge change to make and Success Factors does not, at least in our installation, support xAPI.