Need help? Check out our Support site, then


Embeding Google Analytics tracking ID and script in my WordPress.com blog

  1. I want to add it to my WordPress.com blog to my Google Analytics account but cannot figure out where to imbed the tracking ID and the script.

    The blog I need help with is computerconnect.wordpress.com.

  2. <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    
      ga('create', 'UA-42058349-1', 'wordpress.com');
      ga('send', 'pageview');
    
    </script>
  3. @mcrohio - script is stripped out for security reasons - GA can't be used on blogs here - you can use other third party stats if they use plain html code, Site Meter is one popular program.

  4. Thanks for your response! I tried Site Meter but had the same problem as with WordPress: I can't find access to my template's code. So my issue is more basic than your response assumes. Can you help at that level?

  5. Site Meter works - I use it on my site - you need the plain html version of code - put the code in a Text Widget

  6. Thanks again.
    Problem solved. As usual I was making a simple thing hard.

  7. You be welcome

Topic Closed

This topic has been closed to new replies.

About this Topic