wpvidZ

Learn WordPress With Video Tutorials

  • Blog
  • Browse
    • Backup & Restore
    • WordPress Localhost
    • WordPress Hosting
    • WordPress themes
    • Version Updates
    • Plugin Tips
    • Security
    • Tutorials
    • WordPress SEO
    • WP Miscellaneous
    • Sitemap
  • WP 5+ Tutorial
  • Search
wpvidZ Blog WordPress SEO Where To Paste Google Analytics Code In WordPress

WordPress SEO

Where To Paste Google Analytics Code In WordPress

Last updated on February 18, 2017
Posted on July 25, 2010

Easy to follow tutorial how to insert or put Google analytics code in your wordpress blog theme file.

Google analytics
is one of several ways to track your blog’s visitors, like, where they come from, which search engine brings you the most traffics, or which referral websites your visitors come from, and many more.


The most useful is you will know how many visitors you receive a day or some specific period of times. I added my blog to Google Analytics right after submitting my sites to search engines, like Google, Yahoo, Bing, and Ask. The result will usually show after a few days.

I have decided not to use any Google analytics plugins for this, because we can easily do it without plugin. Do remember, using too much plugins can slow down your page load, and sometimes buggy while upgrading your blog.

If you are using Thesis theme, it will be much easier, you just need to enter the code to tracking Thesis options.

  • Is my site loading fast? I use this shared hosting
  • Try my theme >

So this is how i get Google Analytics code and paste it in my wordpress file or it will work for any html static websites too (I use twenty ten theme of wordpress 3 for this tutorial):

1.Β  Go to this URL: https://www.google.com/analytics/reporting/login and sign in with your gmail account.

Google analytics page.

2. Click “sign up” button.

Sign up for Google Analytics.

3. In “New Account Signup” type in:

-Website’s URL = www.yourwebsiteaddress.com
-Account Name = your web address by default, i left it as it is.
– Time zone country or territory = where you are at.
– Time Zone= Type in to suit your time.

Click “Continue”.

Type in your site's datas.

4. Next, type in your first, and last name, the country and click “Continue”.

5. Read the Terms and Conditions of Google Analytics, and after all ok,Β  tick “Yes, I agree to the above terms and conditions. Then hit “Create New Account” button.

Agree on Terms and Conditions.

6. If we did all correct, the next step is you will see your tracking codes. Copy all of the codes, and Go to your wordpress dashboard admin page.

Copying Google Analytics code.

7. Click Appearance/Editor and look for footer.php.

I personally paste the code in footer of my wordpress theme file, not in </head> as it shown in Google analytics page. Most people paste it in footer, and i never had any problems with having the code in footer.

Open up this footer.php file, and paste the code right before this code: </body>

Click “Update File”.

Where to paste Google Analytics Code in Footer.php wordpress.

Note: There are some theme files which provide you only to add the Google analytics ID, if your theme has this function, then just add theΒ  GA ID which is displayed in your code too. (see image).

Some themes have a feature to paste only GA's ID.

8. Back to Google analitycs page, the last step, is hit “save and finish” button.

9. You will see the website profiles tables, and see your wordpress blog’s URL too. After a few days, check to see the report by clicking “view report” link.

View report of your website or blog.

That’s how i copy and paste Google analytics code to my wordpress blog, did you do differently? πŸ™‚

Video Tutorial:

analytics code google paste to

Latest Posts

  • Twenty Nineteen Theme Full Tutorial – Creating a Website
  • Uninstall W3 Total Cache Plugin – Incredibly Easy!
  • Create WordPress Website 2018 on SiteGround Genesis
  • WordPress Noopener Noreferrer Rel Attribute Quick Fix
  • WordPress CDN Setup with MaxCDN and W3 Total Cache Plugin
  • Twenty Seventeen One Page Parallax Scrolling Website Style
  • How To Add Google Map in WordPress Contact Page
  • WordPress 4.7 Justify Text and Underline
  • Twenty Seventeen Footer “Proudly Powered By WordPress” Text
  • How To Add YouTube Subscribe Button To WordPress Website
← Blog Submission To Ask.com
→ How To Check Dofollow Or Nofollow Blog

Comments

  1. Udegbunam Chukwudi says

    August 1, 2010 at 11:39 am

    For folks who tend to work a lot on our themes, using a plug-in like Google Analytics for WordPress 4 is best. That way we can avoid tracking our visits while previewing our theme/blog changes.

    • Kimi says

      August 2, 2010 at 11:54 am

      @Udegbunam Chukwudi, Thanks for the suggestion.

      WordPress 4? or is it the name for the plugin?

  2. Udegbunam Chukwudi says

    August 2, 2010 at 1:42 pm

    You’re welcome. The name of the plug-in is Google Analytics for WordPress 4

  3. Patrick@InternetMarketingBizBlog.com says

    November 4, 2010 at 5:50 pm

    Hi,

    An awesome blog with clear step by step directions to help showing how to put Google Analytics code and paste it in the wordpress file
    with ease.

    Thanks for the clear directions.

    All The Best,
    Patrick Lim

    • Kimi says

      November 4, 2010 at 6:54 pm

      Hey there Patrick,

      Thank you for the encouraging comment, and i am glad the tutorial was clear for you πŸ™‚

      You have a great site, however you may want to fix the “I love the giveaway of the day” box, because the width is somehow bigger than your sidebar’s width.

      Cheers Patrick.

  4. someone@aymmarketer says

    November 23, 2010 at 2:28 pm

    Hi, I’m glad I’ve found your site because I was just wondering lately how to paste it without downloading the plugin in wordpress. I know it could result to some slow if I will install a lot of plugins. Well, this saves my time. Hope it will take effect soon.

    • Kimi says

      November 23, 2010 at 3:58 pm

      Thank you for leaving a comment!

      Glad it saved your time.

  5. Ben Gold says

    December 17, 2010 at 4:34 pm

    Hi,
    I’ve recently started a blog, the information you provide on this site has helped me tremendously. Thank you for all of your time & work.

  6. Somename@analytics code says

    January 5, 2011 at 5:52 am

    Great blog.And I just want to say thanx to you for awaring me
    about the new and revised things about google.

  7. someone@analytics code says

    January 14, 2011 at 5:08 am

    Thanks, really helpful. Even though Google has made it more complex these days, I was still able to follow this really easily and get it working. Awesome.

  8. vadakara says

    January 18, 2011 at 8:32 am

    hi , this is very helpful, really appreciating your attempt

  9. gavin says

    January 18, 2011 at 8:11 pm

    Excellent – I was pulling my hair out how to get google analytics set up but you have made it really clear.

    nice one

  10. Vivek Parmar says

    February 9, 2011 at 8:28 pm

    well i’m using thesis theme and headway + catalyst on my blogs and i do not need to edit any of the files

    • Kimi says

      February 11, 2011 at 7:25 am

      Hi Vivek,

      Yes, if we use those premium themes, we won’t need to edit any files, but not every bloggers have premium themes πŸ™‚

      I notice Twenty Ten is still loveable..

      Thanks for your comment!

  11. Cveta says

    February 17, 2011 at 8:03 pm

    very helpful, just submitted analytics to my blog according to this. but still the status is “tracking not installed” hope that will be ok within few hours or days

  12. Alec says

    March 12, 2011 at 12:42 pm

    Thank you so much. The best detailed information I have found. Most people just say paste it in footer file without stating which line. I’m new to wordpress.

    • Kimi says

      March 13, 2011 at 8:23 am

      Most Welcome, Alec!

      Glad you found it easy to follow πŸ™‚

      Thanks!

  13. Jean says

    March 18, 2011 at 3:21 pm

    Thanks Kimi,

    Finally someone who gave me an answer on what I was looking for. Well explained with the snapshot of the steps to follow. A picture is worth a thousand words. I am using the twenty ten Red Theme and couldn’t find anywhere even in the vague instructions given in theme settings on where it went. I have the site since last fall and haven’t been able to add the analytics because I had no clue where to put it (for that theme). Usually it’s easy to insert it and find the portion of the header but for the Red theme it looks complicated to find. I was, I guess stubborn and kept believeing in putting it in the header. But if it works just the same in the footer then “COOL”.

    Thanks a lot…

    • Kimi says

      March 18, 2011 at 4:16 pm

      Most welcome!

  14. Dustin says

    June 9, 2011 at 6:17 pm

    First blog clearly explaining step by step and not missing stuff. Thanks!

  15. Alexander Heyne says

    July 28, 2011 at 4:52 am

    Hi Kimi —

    I’ve paid for a .com domain through wordpress, and I guess that means it’s different from wordpress.org?

    Anyway, I don’t have the same screens or settings as you guys: if I open a widget called footer, I put in a text box so I can enter HTML and then I paste my code, with the at the end.

    However, I just get the garbled code showing up at the bottom of my webpage. I assume it’s not supposed to be like that. Any suggestions?

  16. shreya says

    November 7, 2011 at 11:08 am

    Thanks for the info that was dying to look for. πŸ™‚ But have a query. After I pasted it in the footer as per your instruction, will the analytics be made of every page of my website or only home page? May be a silly query but I am a complete novice in this field, so would love to know. Thanks in advance!

    • Kimi says

      November 7, 2011 at 6:33 pm

      Hi shreya,

      I also embedded in my footer in this blog, it will be used in every page of your site πŸ™‚

      It’s absolutely not a silly question, have a nice week

      Kimi.

  17. hal says

    November 26, 2011 at 5:32 am

    Hello….you posted this in July 2010 and it is still helping others…I found it very clear and precise……thanks
    hal

  18. Alisha says

    January 18, 2012 at 10:21 am

    Hi there,
    Great tutorial, but I’m in the same boat as Alexander…sucks that WordPress doesn’t allow this if you are a .com. Balls. The garbled code that results in the footer doesn’t look clean so now what?

    • Kimi says

      January 21, 2012 at 11:48 am

      Hi Alisha,

      Welcome to my blog, and yes, you are correct wordpress.com doesn’t allow the users using javascript, including adds and any affiliate links.

      If you are serious into setting up a website or a blog, I would recommend directly getting a webhosting, I used this webhost to begin blogging with this site.

      With this few advantages:
      1. Cheap PRICE. Costs only 4 bucks a month, it’s like a bottle of coke a month, and reliable. I know you will read some other reviews, but trust me, I used it for years and don’t have a complain or issues. I also use other hostings but they are more expensive so not very ideal to start your own blog unless you have a budget, but they also have same features.

      2. Free one domain name, other cost you extra for a domain name.

      3. You can monetize your blog for later use, or basically you have a full control of your site, no need to be worried to have hassles transfering or migrating your big blog once it is big.

      With your own webhosting, you can then install wordpress with this quick clear video: https://www.wpvidz.com/wordpress-versions/

      And you can add any plugins, themes, and any codes you prefer.

      I hope this helps

      Kimi.

  19. Ismail says

    January 23, 2012 at 10:31 am

    HOW DID YOU FIX THE MOVING BUTTON?;….. E.G FOLLOW,SHARE, COMMENTS ETC…. KINDLY INFORM ME AT CONCEPTUAL92@GMAIL.COM

  20. pawan negi says

    February 2, 2012 at 6:28 pm

    thanks for such a usefull post it solve my problem in a minute.

  21. Paul T says

    March 2, 2012 at 3:12 am

    Thanks for the tip about putting the Google Analytics code in the footer. Works well.

    • Kimi says

      March 2, 2012 at 6:43 am

      Hi Paul,

      Glad it was a help Paul

      Thanks for leaving a comment

      Kimi.

  22. suraj says

    March 2, 2012 at 7:54 pm

    I didn’t understand why you said we need to use the plugin?? adding code in footer.php is normal code modification method….i m bit confused about that!!!!

  23. Egami says

    March 11, 2012 at 11:14 pm

    hi Kimi
    thank u very much for this post, it saved me ..i just confused that the steps i have read in google analytics website after i made an account is that to paste the code in each page , ..i noticed u have have pasted it once in the footer .. can u explain to me this differance

    best regard

    • Kimi says

      March 12, 2012 at 7:03 am

      Hi Egami,

      Yes, I only paste in the footer.php, since a wordpress theme is usually connected to footer.php file whenever it is opened.

      I hope this can help

      Thanks for visiting my blog,

      Kimi

  24. Sean says

    March 31, 2012 at 9:55 am

    Hi,

    I do not see the footer.php option under “Appearance” in wordpress. Could you kindly help me. Thank you in advance.

    Sean

    • Kimi says

      April 1, 2012 at 8:16 am

      Hi Sean,

      It can depend on the theme you’re using, you probably use a theme which has different file structure as the theme I used in this tutorial.

      You can use a plugin for this alternatively.

      Kimi.

  25. Naveen says

    January 9, 2013 at 4:18 pm

    Thanks Kimi,

    Useful tutorial, when I was searching Google, landed here.

  26. Thierry says

    January 9, 2013 at 9:01 pm

    Thanks very much Kimi. I was stuck for an hour figuring out how to paste my google-analylics code. Then, searched on google and found your post. You really made my day. Thanks again.

  27. Sharaj says

    January 10, 2013 at 7:47 pm

    Thanks Kimi for this helpful tutorial on adding google analytic code, actually my theme had an option to add the code directly but some how it was not functioning properly. Let see how it works. Anyway thanks πŸ™‚

  28. J. Barley says

    May 7, 2013 at 12:10 am

    Thank you very much for your clear and concise instructions! I am building my blog with relatively no knowledge of the internet, so websites like yours are extremely helpful!
    THANKS!

  29. doreen says

    May 13, 2013 at 9:42 pm

    thanks so much Kimi. Im glad i landed on your tutorial. youve just saved me hours of researching πŸ™‚

Comment form on this post is closed after 60 days.

Search

Worth Reading

  • Google Webmaster Tools | Very important to check
  • Importance of sitemap for SEO in WordPress - Should I have a sitemap?
  • With or without www wordpress blog
  • 404 not found webmaster tools error - how to fix?
  • Wordpress tag cloud - are wordpress tags good for SEO?
  • Sitelinks wordpress blog [when will my blog has sitelinks?]
  • Reduce bounce rate blog [how to] - bounce rate affects page rank?
  • H1 H2 - The importance of heading tags for wordpress post
  • Google pr update 2011 | How i get my pagerank back from 0 to 4
  • How to get 1000 visitors a day to your blog | SEO tips

Backup & Restore

Backup WordPress Without a Plugin or FTP

Export WordPress Database using phpMyAdmin

BigDump Alternative – When BigDump Failed Importing Large WP Database

At This Place The Current Query Includes More Than 300 Dump Lines

View All..

Live Online Website

View All..

Offline Installation

How to Upload WordPress localhost to live server manually

Steps to Install WordPress on Windows 8 and WAMP 2.4

Install WordPress on Mavericks OS X 2014

Maximum upload file size in WAMP WordPress

View All..


WPvidz Hosting Image

  • About Me
  • Contact
  • Affiliate Disclosure
  • Privacy Policy
  • Term of Use

Copyright© 2023 wpvidz.com SG2021 | sitemap.xml


WPvidz.com is independent from WordPress.org but is proudly powered by WordPress & its block-based editor (Gutenberg)

WpvidZ.com uses cookies" to give you the best browsing experience possible. If you click "I Accept" below then you are consenting to this. For more information about your privacy settings on this website, please visit the Privacy Policy page. I Accept