Like stormy said, play with the options, create a profile and stick with it... that's how I had my G7 and now my G9.
It gets a bit complex and annoying to make different profiles for different games. For the most part, the console ported games don't have options for all the buttons on the mouse so, you'll be hard press binding those buttons, might as well use letter to bind each button.
Example
Mouse button #4 = P
Mouse Button #5 = L
Mouse Button #6 = M
Mouse Button #7 = N
or something similar then on each game you bind those letter to what you want and then you know what each mouse button will do.