Resumen: Abstract: We construct concrete counterterms of the Balasubramanian-Kraus type for Einstein-scalar theories with designer gravity boundary conditions in AdS4, so that the total action is finite on-shell and satisfy a well defined variational principle. We focus on scalar fields with the conformal mass m2 = −2l−2 and show that the holographic mass matches the Hamiltonian mass for any boundary conditions. We compute the trace anomaly of the dual field theory in the generic case, as well as when there exist logarithmic branches of non-linear origin. As expected, the anomaly vanishes for the boundary conditions that are AdS invariant. When the anomaly does not vanish, the dual stress tensor describes a thermal gas with an equation of state related to the boundary conditions of the scalar field. In the case of a vanishing anomaly, we recover the dual theory of a massless thermal gas. As an application of the formalism, we consider a general family of exact hairy black hole solutions that, for some particular values of the parameters in the moduli potential, contains solutions of four-dimensional gauged (Formula presented.) supergravity and its ω-deformation. Using the AdS/CFT duality dictionary, they correspond to triple trace deformations of the dual field theory.