Lego2012
12/13/2016 - 12:02 PM

Google Analytics Without Editing Theme

Google Analytics Without Editing Theme

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

<!-- 
Ever update your parent theme and then realise a few weeks later that you haven’t added your Google Analytics tracking code? All those stats, lost! Add your tracking code to your functions instead: 
-->

<?php add_action('wp_footer', 'ga'); function ga() { ?> // Paste your Google Analytics code here <?php } ?>