Title: Adding Google Analytics?
Last modified: August 19, 2016

---

# Adding Google Analytics?

 *  [brewbaker](https://wordpress.org/support/users/brewbaker/)
 * (@brewbaker)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/adding-google-analytics/)
 * 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)

 *  [iridiax](https://wordpress.org/support/users/iridiax/)
 * (@iridiax)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/adding-google-analytics/#post-799146)
 * Put it in your theme’s footer.php file.
 *  [stuartsgp](https://wordpress.org/support/users/stuartsgp/)
 * (@stuartsgp)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/adding-google-analytics/#post-799466)
 * Is there any difference in simply putting the GA.JS tracking code into the footer.
   php vs using a google analytics wordpress plugin?
 *  [James Collins](https://wordpress.org/support/users/jamescollins/)
 * (@jamescollins)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/adding-google-analytics/#post-799467)
 * 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.
 *  [lizdemaree](https://wordpress.org/support/users/lizdemaree/)
 * (@lizdemaree)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/adding-google-analytics/#post-799509)
 * 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)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 3 months ago](https://wordpress.org/support/topic/adding-google-analytics/#post-799510)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 6 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/adding-google-analytics/#post-799510)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
