WordPress and Google Analytics

When you add your website to Google Analytics it tells you to add the tracking code right before the closing </body> tag.

Now, the website that I was adding was this WordPress blog so my first question was: where on earth (or server) is the PHP file that contains this closing tag?  And after a bit of PHP code reading I found it.

The file is called footer.php and this file is located in /wp-content/themes/[YOUR_THEME]/.  Being located in the themes folder this means you need to remember to re-add the code when you decide to change your theme.


Tags: ,

© 2008-2018 BI: Beer Intelligence? All Rights Reserved