0

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?

Thanks!

1

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

<?php
add_action( 'login_footer', 'zzMzz_output_ga' );

function zzMzz_output_ga() {
    ?>
<!--
Your Google analytics <script> tag here
-->
    <?php
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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