Gauging a global symmetry $G$ introduces several free parameters to the theory. For example,
In $d=4$, gauging a simple and simply-connected Lie group introduces a coupling constant and a theta term, $(g,\theta)\in\mathbb R\times U(1)$.
In $d=3$, gauging a simple and simply-connected Lie group introduces a coupling constant and a Chern-Simons term, $(g,k)\in\mathbb R\times\mathbb Z$.
Gauging semi-simple Lie groups just adds more copies of these terms. Non-simply connected groups usually have extra theta terms (which may be integral instead of continuous). Similar story for discrete symmetries.
What is the mathematical object that controls these parameters? I would expect some map $\mu\colon\mathbf{Diff}\times \mathbf{Group}\to\mathbf{Ring}$ or something like that (with e.g., $\mu(M_4,SU)=\mathbb R\times U(1)$, as above). Is this map well-defined at all? If so, does it have a name/has it been studied?