The key point is that the parameter g must be dimensionless, otherwise one introduces a fixed length scale into the theory: For φ theory, this is only the case in D = 4. Note that under these transformations the argument of the function φ is unchanged.