Weyl invariant scalar field theory

I'm not sure if this is the right place for this question, so feel free to move it. Anyway, my question is, is there any good reason why the following field theory should be Weyl invariant in an arbitrary dimension d>1:

Here [itex]\phi[/itex] is a scalar field and [itex]R[/itex] is the Ricci scalar associated to the metric [itex]g_{\mu \nu}[/itex]. By Weyl invariant I mean invariant under the scalings:

[tex] g_{\mu \nu} \rightarrow e^\Omega g_{\mu \nu} [/tex]

[tex] \phi \rightarrow e^{\frac{2-d}{4} \Omega} \phi [/itex]

where [itex]\Omega[/itex] is an arbitrary scalar function. If one calculates the change in the action under this transformation, one finds two separate types of terms have to cancel (one linear and one quadratic in [itex]\Omega[/itex]), and the coefficients seem to miracuously work out so that this happens. I'm guessing there's some simple geometric reason why this has to be so, but I can't think of it.

It might be related to the fact that the dirac operator commutes with conformal rescalings, and squares to something like [itex] \nabla^2 + \frac{1}{4} R[/itex], but I'm pretty sure the coefficient on R is different here, and in any case, that's an operator on spinors, not scalars.

That looks very stringy to me, and i've seen that before someplace. It looks very similar to terms in the Polyakov action + a worldsheet Einstein Hilbert-Dilaton like term (which has the Euler characteristic floating around, which I think is related to the geometrical reason you were looking for). Alternatively it has the form of a nonlinear sigma model written in some sort of conformal frame.