Title: Google analytics code
Last modified: August 21, 2016

---

# Google analytics code

 *  [coloradoauthorsleague](https://wordpress.org/support/users/coloradoauthorsleague/)
 * (@coloradoauthorsleague)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/google-analytics-code-6/)
 * I am trying to paste the google analytics code into the proper PHP file for this
   theme to have analytics on the visitors to our home page. Can you tell me where
   I need to post that – which file and before or after which code?
 * Or do I need to use a plugin for analytics instead of a direct tracking?
 * Thank you!

Viewing 1 replies (of 1 total)

 *  [bravokeyl](https://wordpress.org/support/users/bravokeyl/)
 * (@bravokeyl)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/google-analytics-code-6/#post-4365894)
 * You can place it in the header.php or footer.php but it gets lost when the theme
   updates ..so try using plugin.
    check here and install whatever suits to you 
   [http://wordpress.org/plugins/tags/google-analytics](http://wordpress.org/plugins/tags/google-analytics)

Viewing 1 replies (of 1 total)

The topic ‘Google analytics code’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/utility/1.2.1/screenshot.png)
 * utility
 * [Support Threads](https://wordpress.org/support/theme/utility/)
 * [Active Topics](https://wordpress.org/support/theme/utility/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/utility/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/utility/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [bravokeyl](https://wordpress.org/support/users/bravokeyl/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/google-analytics-code-6/#post-4365894)
 * Status: not resolved