I would like to add a Google Analytics tracker tag to my login page (wp-login.php).

What's the easiest way to accomplish this?


1 Answer 1


The easiest way would be to hook onto the login_footer action and output your GA code:

add_action( 'login_footer', 'zzMzz_output_ga' );

function zzMzz_output_ga() {
Your Google analytics <script> tag here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.