Title: Google Analytics for WordPress not posting correct code?
Last modified: August 19, 2016

---

# Google Analytics for WordPress not posting correct code?

 *  [hadlock](https://wordpress.org/support/users/hadlock/)
 * (@hadlock)
 * [18 years ago](https://wordpress.org/support/topic/google-analytics-for-wordpress-not-posting-correct-code/)
 * The Google Analytics for WordPress plugin isn’t working I don’t think. This is
   the one designed by joostdevalk. I have my account number plugged in, but none
   of my pages have the
 *     ```
       <script type="text/javascript">
       var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script>
       <script type="text/javascript">
       var pageTracker = _gat._getTracker("");
       pageTracker._initData();
       pageTracker._trackPageview();
       </script>
       ```
   
 * code right before the /body tag as per Google Analytics’ help page. The last 
   line in the body before the /body tag is
 * `<script src="adsense-track.js" type="text/javascript"></script>`
 * I’m not seeing ga.js anywhere on the site.
 * Am I doing something wrong? The readme.txt says it’s compatible with 2.2 and 
   higher, and I am running 2.2.1. Google analytics says it’s recieving data, but
   it hasn’t recorded a single hit, while WordPress.com Stats by skeltoac & mdawaffe
   is recieving and recording data.

The topic ‘Google Analytics for WordPress not posting correct code?’ is closed to
new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [hadlock](https://wordpress.org/support/users/hadlock/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/google-analytics-for-wordpress-not-posting-correct-code/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
