Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to add google analytics to my free wordpress.com blog. I have the html tracking code but I can't figure out how to add it to my blog from the wordpress.com dashboard.

share|improve this question

migrated from webapps.stackexchange.com Jun 25 '11 at 16:23

This question came from our site for power users of web applications.

2 Answers 2

I just found out that it is not supported: https://en.support.wordpress.com/stats/#additional-info

However, I would still like to know how to add some html script to my wordpress.com hosted site.

share|improve this answer

the <script> tag is not allowed on Wordpress.com

Since the Google Analytics script uses that tag, it's not possible to add it. This has been asked and dealt countless of times on the forums of Wordpress.com but they do not wish to compromise the security of their site by allowing scripts (Javascript/VBScript).

If you find a place to host your site and decide to use the Wordpress app (found at Wordpress.org), then you'll be able to modify it and add scripts as much as you want! That's what I ended up doing with my blog that I had originally created on Wordpress.com.

Just as an extra, I found this interesting exerpt on their forums:

Google's rule is that only one Google analytics script (Urchin) can be run on any blog; they do not allow two. And wordpress.com runs Google analytics (urchin) on all of our blogs.

source: http://en.forums.wordpress.com/topic/google-analytics-on-wordpress-how_

share|improve this answer
    
Thanks Faust, do you know how to add non-js tracking tools to wordpress.com blogs? The wordpress site tracking doesn't identify users with their inferred ip/geo-location. I just want to be able to do this. I heard there are some non-js tracking tools, which should work for wordpress.com blogs, but I do not know where I can edit the HTML in wordpress.com to add any code. –  highBandWidth Jan 19 '11 at 17:19
    
see onecoolsitebloggingtips.com/2009/10/24/… –  Faust Jan 19 '11 at 23:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.