  A new method for integrating anomalous Ward identities and finding the
effective action is proposed. Two-dimensional supergravity and $W_3$-gravity
are used as examples to demonstrate its potential. An operator is introduced
that associates each physical quantity with a Ward identity, i.e., a quantity
that is transformed without anomalous terms and can be nullified in a
consistent manner. A covariant form of the action for matter field interacting
with a gravitational and $W_3$-gravitational background is proposed.
