We present a theory of the entanglement transition tuned by measurement strength in qudit chains evolved by random unitary circuits and subject to either weak or random projective measurements. The transition can be understood as a nonanalytic change in the amount of information extracted by the measurements about the initial state of the system, quantified by the Fisher information. To compute the von Neumann entanglement entropy S and the Fisher information F, we apply a replica method based on a sequence of quantities ˜S (n) and F(n) that depend on the nth moments of density matrices and reduce to S and F in the limit n ? 1. These quantities with n 2 are mapped to free energies of a classical spin model with n! internal states in two dimensions with specific boundary conditions. In particular, ˜S(n) is the excess free energy of a domain wall terminating on the top boundary, and F(n) is related to the magnetization on the bottom boundary. Phase transitions occur as thespin models undergo ordering transitions in the bulk. Taking the limit of large local Hilbert space dimension q followed by the replica limit n ? 1, we obtain the critical measurement probability pc = 1/2 and identify the transition as a bond percolation in the 2D square lattice in this limit. Finally, we show there is no phase transition if the measurements are allowed in an arbitrary nonlocal basis, thereby highlighting the relation between the phase transition and information scrambling. We establish an explicit connection between the entanglement phase transition and the purification dynamics of a mixed state evolution and discuss implications of our results to experimental observations of the transition and simulability of quantum dynamics.