The factor of four and why Goldman has a different factor is explained on page 6 of <A HREF="https://arxiv.org/abs/1711.03429">Generalization of a formula of Wolpert for balanced geodesic graphs on closed hyperbolic surfaces.</A> A derivation with prefactor four is given in section 2 of <A HREF="https://arxiv.org/abs/1406.1821">The complex symplectic geometry of the deformation space of complex projective structures.</A>