We don't have text variables here, so you're always going to have to use On Page Scripting with names or letters tied to the numbers. A global script isn't going to do anything different in that case, it's still the same information stored in the variables either way. Global is for something like, if you want to display the name or check the status of something on every single page.
I can't test the script in the article right now but I don't remember having issues with it before. You may be better off just checking out the one for On Page Scripting though, it works exactly the same no matter what you're doing.