Question

I'm trying to use GA Tracking to Track Wordpress Sign-ups on my site. I'm assuming I need to use Goal Tracking and NOT Event tracking for this. I tried setting up goal tracking but it's not working. I am not using any GA plugins like Yoast, etc.

I can't get this to work with Wordpress:

  1. I set my Goal URL to: /wp-login.php?checkemail=registered (URL landing page for sign-ups)

  2. Match Type: "Exact Match"

  3. No Goal Funnel was set.

GA is not tracking any of my sign-ups. What I am doing wrong here? My site is www.StreetofWalls.com if you would like to test.

Was it helpful?

Solution

The script that loads google-analytics isn't on the login page, so you're not getting any of the /wp-login.php?checkemail=registered pageviews sent back to google.

Put this on your wp-login.php page

<script type='text/javascript' src='http://www.streetofwalls.com/wp-content/themes/sow3/js/google-analytics.js'></script>

OTHER TIPS

While TomFuertes's answer will work, it is not good to modify core WordPress files like wp-login.php. Updates to WordPress will overwrite any changes that you make and avoiding WordPress updates is a very bad idea.

I recommend adding the code using the login_head hook in your functions.php file:

function add_ga_to_login_page(){
  echo '<script>';
  echo 'GA TRACKING CODE HERE';
  echo '</script>';
}

add_action('login_head', 'add_ga_to_login_page');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top