homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / WordPress
Forum Library, Charter, Moderators: lorax & rogerd

WordPress Forum

Why Does Google Analytics Hate Wordpress?

 2:02 pm on Apr 24, 2012 (gmt 0)

Hi there, Everyone:

I peeked at my analytics last night and was delighted to see how much my bounce rate improved ever since I move my article pages from static html to wordpress.

Then I realized the bounce rate improved WAY TOO MUCH. Like now, most of my wordpress pages have a bounce rate of 0%. The HIGHEST bounce rate for any wordpress pages is under 7%

Does anybody have any suggestions on how to trouble shoot this?

I have the GA code in the head element of my wordpress pages. I think that it is suggest to have it as the LAST thing in the head element, right before the closing head tag, but unfortunately some other scripts are located below it.

Here is my code:

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1234567-8']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);




 7:21 pm on Apr 27, 2012 (gmt 0)

Found it.

turns out the theme I am using was displaying the analytics code TWICE, which was messing up the bounce rate.

I changed it yesterday (had to hard code it in the theme header.hp file) and after looking at everything in GA, the bounce rate is now around 40% to 50% for my wordpress pages, which is about normal.


 6:17 pm on May 1, 2012 (gmt 0)

How did you display the code twice in the first place? Did you have 2 plugins doing the same job? Or did you enter the code in 2 places on accident?


 9:57 pm on May 2, 2012 (gmt 0)

Actually, I am quite certain the problem was caused by the theme I am using.

there is a field in the theme options settings to insert the GA code.

I inserted it in the place they said would be echoed right before the closing head tag (and only inserted it once).

When I looked at the source, it showed up twice.

When I removed it from the theme options and instead used an SEO plugin, it only showed once.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / WordPress
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved