In David Tong's lecture notes on string theory, section 5.3.2 An Aside: Non-Critial Strings, page 121, he describes the non-critical string with the following action:
$$S_{\text{non-critical}} = \frac{1}{4\pi \alpha'} \int d^2\sigma \sqrt{g}\ (g^{\alpha\beta}\ \partial_\alpha X^\mu\partial_\beta X_\mu + \mu)$$
Here $\mu$ has the interpretation of a worldsheet cosmological constant.
He considers a two metrics related by a Weyl transformation $$\hat{g}_{\alpha\beta} = e^{2 \omega}g_{\alpha\beta}.$$
As we vary $\omega$, the partition function $Z[\hat{g}]$ supposedly changes as $$\frac{1}{Z}\frac{\partial Z}{\partial \omega} = \frac{1}{Z}\int DX e^{-S}(-\frac{\partial S}{\partial \hat{g}_{\alpha\beta}}\frac{\partial \hat{g}_{\alpha\beta}}{\partial\omega})$$ $$=\frac{1}{Z}\int DX e^{-S}(-\frac{1}{2\pi}\sqrt{\hat{g}}T^\alpha_{\alpha})$$ $$=\frac{c}{24\pi}\sqrt{\hat{g}}\hat{R} - \frac{1}{2\pi\alpha'}\mu e^{2\omega}$$
My question: how to get the $- \frac{1}{2\pi\alpha'}\mu e^{2\omega}$ term?
Here $\sqrt{g} = \sqrt{\det g_{\alpha \beta}}$, I tried to calculate the derivative of the determinant, which looks something like the cofactor matrix. But that's nowhere near the term $- \frac{1}{2\pi\alpha'}\mu e^{2\omega}$.