  We develop an alternative approach to study the effect of the generic
perturbation (in addition to explicitly considering the loss term) in the
nonlinear Klein-Gordon equations. By a change of the variables that cancel the
dissipation term we are able to write the Lagrangian density and then,
calculate the Lagrangian as a function of collective variables. We use the
Lagrangian formalism together with the Rice {\it Ansatz} to derive the
equations of motion of the collective coordinates (CCs) for the perturbed
sine-Gordon (sG) and $\phi^{4}$ systems. For the $N$ collective coordinates,
regardless of the {\it Ansatz} used, we show that, for the nonlinear
Klein-Gordon equations, this approach is equivalent to the {\it Generalized
Traveling Wave Ansatz} ({\it GTWA})
