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

---

# Adding Google Analytics

 *  [JoanneB](https://wordpress.org/support/users/joanneb/)
 * (@joanneb)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/adding-google-analytics-3/)
 * Hi
    I am new to WordPress and I am trying to add Google Analytics to my website,
   however, not sure where to add it. This is the information that I have been given:
   Copy the following code, then paste it onto every page you want to track immediately
   before the closing </head> tag.
 * <script type=”text/javascript”>
 *  var _gaq = _gaq || [];
    _gaq.push([‘_setAccount’, ‘UA-22510927-1’]); _gaq.push([‘
   _trackPageview’]);
 *  (function() {
    var ga = document.createElement(‘script’); ga.type = ‘text/javascript’;
   ga.async = true; ga.src = (‘https:’ == document.location.protocol ? ‘[https://ssl&#8217](https://ssl&#8217);:‘
   [http://www&#8217](http://www&#8217);) + ‘.google-analytics.com/ga.js’; var s
   = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);})();
 * </script>
 * I have tried to open the source page of the website, but I couldn’t seem to add
   any information into it.
 * Could someone please assist as I would like to get this working properly.
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [spatch](https://wordpress.org/support/users/spatch/)
 * (@spatch)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/adding-google-analytics-3/#post-2038152)
 * There is actually a plug-in you can use on your blog called Google Analytics 
   for WordPress, i use it on my website and it works a treat. Hope that helped.
 * Cheers
    _[[signature removed](http://codex.wordpress.org/Forum_Welcome#Signatures)]_
 *  [sunkey](https://wordpress.org/support/users/sunkey/)
 * (@sunkey)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/adding-google-analytics-3/#post-2038342)
 * My footer supports widgets how do i add analytics code to it? here is my blog
   [](http://www.socialblog.in/)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding Google Analytics’ is closed to new replies.

## Tags

 * [adding](https://wordpress.org/support/topic-tag/adding/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [sunkey](https://wordpress.org/support/users/sunkey/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/adding-google-analytics-3/#post-2038342)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
