Forums

Adding Google Analytics? (6 posts)

  1. brewbaker
    Member
    Posted 3 years ago #

    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.

  2. iridiax
    Member
    Posted 3 years ago #

    Put it in your theme's footer.php file.

  3. stuart.sgp
    Member
    Posted 3 years ago #

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

  4. James Collins
    Member
    Posted 3 years ago #

    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.

  5. lizdemaree
    Member
    Posted 3 years ago #

    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.

  6. Otto
    Tech Ninja
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.