Using the WordPress functions file I was able to add the tracking code. It will then make the tracking code available to every page on your WordPress site.

You will need to add this code to your theme’s functions.php usually located at:

/wp-content/themes/<yourTheme>

You will need to add this code at the bottom of your functions.php file:

<?php
add_action('wp_head', 'wpb_add_googleanalytics');
function wpb_add_googleanalytics() { ?>
<!-- - Google Analytics -->
// Your Google Analytics code here
<!-- End Google Analytics -->

<?php } ?>


Leave a comment

Your email address will not be published. Required fields are marked *