In the Big Yellow Book(BYB) of CFT by P.D. Francesco et al, the authors claim in Sec.4.2 that under a conformal transformation (CT) $\psi: x\to x'$, a spinless field $\phi(x)$ transforms as (Eq.(4.32) in BYB) $$ \phi(x)\to\phi'(x')=\Big|\frac{\partial x'}{\partial x}\Big|^{-\Delta/d}\phi(x),\tag{1} $$ where $\Delta$ is the scale dimension of $\phi$, $d$ is the spacetime dimension, and $\Big|\frac{\partial x'}{\partial x}\Big|$ the Jacobian of the conformal transformation of the coordinates.
I'm trying to reproduce the above transformation law (1) in the theory of massless free boson (MFB) in $d$-dimensions, and here is what I did:
Consider the action of the MFB $$ S=\int_{\mathbb{R}^d} d^d x(\partial\phi)^2, $$ and suppose that the metric component after the coordinate transformation $\psi$ reads $$ g'_{\mu\nu}(x')=\psi_*\Big(\delta_{\mu\nu}(x)\Big)=e^{f(x')}\delta_{\mu\nu}. $$ Then we have (the principle of general covariance) $$ \begin{align} S=\int_{\mathbb{R}^d} d^d x\partial_{\mu}\phi\partial_{\nu}\phi \delta^{\mu\nu}=&\int_{\mathbb{R}^d}\sqrt{|g'|}d^d x'\partial'_{\mu}\phi_s'\partial'_{\nu}\phi_s'g'^{\mu\nu}\nonumber\\ =&\int_{\mathbb{R}^d}e^{(d-2)f/2} d^d x'\partial'_{\mu}\phi_s'\partial'_{\nu}\phi_s'\delta^{\mu\nu}.\tag{2} \end{align} $$ where $\phi_s':=\psi_*\phi$ denotes the standard push forward field of $\phi$ generated by $\psi$. Since $\phi$ is a scalar, we simply have $\phi'_s(x')=\phi(x)$.
On the other hand, since we want the $d$-dimensional MFB to be a conformal field, we impose that $$ S=\int_{\mathbb{R}^d} d^d x\partial_{\mu}\phi\partial_{\nu}\phi \delta^{\mu\nu}=S'=\int_{\mathbb{R}^d} d^d x'\partial'_{\mu}\phi'\partial'_{\nu}\phi' \delta^{\mu\nu}\tag{3}, $$ where $\phi'$ is the field after the conformal transformation. Comparing (2) and (3), we get a constraint equation of $\phi'$ $$ \sum_{\mu}(\partial'_{\mu}\phi')^2=e^{(d-2)f/2}\sum_{\mu}(\partial'_{\mu}\phi_s')^2, \tag{4} $$ which may give that $$ \begin{align} \partial'_{\mu}\phi'=&e^{(d-2)f/4}\partial'_{\mu}\phi_s',\quad(\mu=0,1,...d-1).\tag{5}\\ &\Downarrow\\ \phi'=&\int dx'^{\mu}e^{(d-2)f/4}\partial'_{\mu}\phi_s' \quad(\text{no summation for $\mu$}).\tag{6} \end{align} $$ However, in term of (1) (Eq.(4.32) in BYB), we have $$ \phi'(x')=\Big|\frac{\partial x'}{\partial x}\Big|^{-\Delta/d}\phi(x)=e^{(d-2)f/4}\phi'_s(x')\tag{7}. $$ Apparently, (6) equals (7) if and only if $f=const.$, but for general conformal transformations, we should allow $f$ to be a function of $x'$.
What's wrong with my derivation? Any help is appreciated!
Note added: One might think that my question is similar to this one. But I believe that my question is different from that one. The OP of that question confused conformal transformations in field theory with diffeomorphism in gravity. I do understand that a CFT is an FT that is invariant under (conformal) diffeomorphism + Weyl transformation, and I hope my derivation shows this well.
Note added 2: Why does someone always think that his abstract answer to that question answers my specific question here?