I agree, don't put them into your burger. There is a burger style, though, that, I think, comes from Oklahoma (not sure on that part though). You lay a slice of onion on your flattop, give it a minute to start cooking, place a ball of burger meat on top of it, then smash it flat, like a diner style "smash" burger (as opposed to a thicker, pub style burger). Season with salt and pepper, let it cook a couple of minutes then flip, season, and finish cooking.
The key to good "smash" burgers is to make sure that your cooking surface is really, really hot. Place your ball of meat on your cooking surface, wait about 5 seconds then smash it flat, quickly (within a couple of seconds) and then don't press it again. A good diner style, or "smash" style burger should have an almost crispy exterior, with a few really crispy bits around the edges, still be soft inside and still retain some fat and moisture. It's actually much harder to do well than it sounds like it should.