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

  • Author
    Posts
  • #1357636

    mcrohio
    Member

    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.

    #1357765

    tipuvs
    Member
    <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>
    #1357766

    auxclass
    Member

    @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.

    #1357776

    mcrohio
    Member

    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?

    #1357777

    auxclass
    Member

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

    #1357800

    mcrohio
    Member

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

    #1357802

    auxclass
    Member

    You be welcome

The topic ‘Embeding Google Analytics tracking ID and script in my WordPress.com blog’ is closed to new replies.