I use an JS IF statement within custom code section:
Very basic and cut down version of what I use:
if(Stage == "abc") { s.events = "event42"; } else if (Stage == "def") { s.events = "event43"; }
If you're doing it for non pageviews the code is slightly different due to the way s.tl works