• How do I access the individual pages source code so I can put in my Google Analytics code for tracking? It needs to go before the </body> tag on each page.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Put it in your theme’s footer.php file.

    Is there any difference in simply putting the GA.JS tracking code into the footer.php vs using a google analytics wordpress plugin?

    The end result should be the same, however using a plugin would mean you don’t have to edit the theme.

    I would personally use a plugin instead of editing the theme’s file, especially if the theme you’re using is one that’s written by a third party and may be updated by them in the future.

    I added the G. code to the footer.php but when I clicked on “update file” it erased all the code! Help! I was using the default theme, as I’ve just started the blog.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Then just download the original footer.php file to the site again, since it was lost. Then redo the edit.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding Google Analytics?’ is closed to new replies.