Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

Comments

  1. Ekta says:

    Hi, i tried to follow your instruction. I activated the plugin insert headers and footers and then went to settings.
    The header and footer are blank. I just have pasted the code from Google analytics and saved. Is that correct?
    I am not sure about this ”paste it in your theme’s header.php right after the tag”.

  2. guntaka subba Reddy says:

    How is add google analytics blog like if we are running a ecommmerce site and maintaining blog . Two different versins . please letme know

  3. Emma C says:

    Super helpful tutorial – thank you!

  4. Marie says:

    Thank you very much for this super simple tutorial! Very helpful :)

  5. Tania says:

    Very helpful! I just don’t know, after I click ‘save’, where can I see the stats. Cause I click it and nothing happens.

    • WPBeginner Support says:

      You will need to login to your Google Analytics account. It may take upto 48 hours for Google Analytics to start showing stats.

  6. Mert says:

    Copy and paste to my theme’s header.php right after the tag will enable me to track every post and page? Or just the home page? If it is just the homepage, then how I can add this code to my every single page? Btw I do not like using plugins, since It reduces loading speed of website.

  7. Amber says:

    Thanks very much! I’ve been staring at this for days >.< I'm so glad its up and running so I can see how few people I'm getting to my site ;P

  8. pk says:

    where we have to add this plugin…in header or in footer..
    pl clarify this . it is little bit confusing.

  9. Cameron Archibald says:

    I would like to point out that the direct paste method states to put the code right after the tag. I would recommend putting it right before the tag. As it is Google’s recommendation and is required if you want to verify Search Console through GA method.

    I think if Google recommends it you should do it right?

    • Cameron Archibald says:

      Sorry the code was cut out…It states right after the body tag but it should go right BEFORE the closing head tag.

  10. Nancy says:

    Can google analytics be added to a blog with free plan on wordpress??

  11. Leo Stalin says:

    Awesome explanation, thanks.

  12. Jone Quest says:

    When I click the Add new account option nothing happen. Any ideas?

  13. Melissa Merriam says:

    Thanks for the refresher.

  14. Gianni Contestabile says:

    As usual, this was a great help! Thank you very much for the detailed info and video.

    Cheers!

  15. LIsa says:

    Very helpful but yes, there is a bit of confusion between the written and the video ~ I added to both the header and footer box with the reasoning being that I can easily go back and edit if necessary. Thanks for all the help!

  16. Marcus says:

    Great help ..

  17. Luke says:

    What amazing explanation..
    Thank you very much for your time and effort invested in this video…

  18. Fernanda says:

    This was great help! Thank you very much for the detailed info :)

  19. Milan says:

    The video helped a lot! It was the easiest tutorial I came across and actually worked!

    Thank you so much!

  20. Rachel says:

    Just followed the video found it very easy to use. Thank you

  21. Bjorn says:

    Thanks a lot for the helpful tutorial!

  22. Pravin Nath.K says:

    Hey buddies, Install Google analytics using Yoast analytics plugin is best choice. If you are switch theme, the code will be on your blog forever.

  23. Andy Simpson says:

    Personally I’d use Google Tag Manager and then add GA

  24. Mina says:

    I used the plugins method. It was superb and easy as well! Thanks WPbeginner for your great tutorial.

  25. Amy Hunt says:

    I copied the PHP code straight into wordpress and it crashed my whole site, I had to go into my host files and delete it.

    Apparently I wasn’t supposed to use the PHP at the start or end of the code along with the // at the end but why was it included??

  26. Florence says:

    The video shows her putting the code in the footer, but the written material says to put it in the header. Thought I would point this out. It is very confusing. The video shows script in both header and footer, but no instructions to do both.

  27. saijad says:

    i followed second method for adding Google Analytics in my blog.

  28. Bud Johnson says:

    I have installed google analytics on my computer and have also installed google analytics dashboard for wp. I have carefully gone through all of the steps in the tutorial and obtained an access code. When I paste this access code into the feed and save it I keep getting an error message. It says I don’t have a valid account. Any suggestions?

  29. David Catlin says:

    I initially installed “Header and Footer” instead of “Insert Headers and Footers”–very confusing! It took me a while to figure out why what I was seeing on my site didn’t quite match the video, which was frustrating. I think I have it straightened out now.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.