Best way to add Analytics code into WordPress site

Many WordPress site owners don’t know where to place Google Analytics code so they can track visits and their behavior on the site.

You can find many plugins which helps to implement Google Analytics code, but still sometimes that is not a good solution. Plugins can help but not always. Sometimes you have plugin conflict with some other plugin or it is incompatible with a WordPress theme you have choose.
Best way to add Analytics code into WordPress site is to add it by yourself. It is not so hard, and only takes a minute. However, first you must figure out where to place Google Analytics code.
My example shows you how to add code, and how to check if that code works.
First of all I made New Property and get my Google Analytics Code. Next thing I have done is that I logged into my sites as Administrator and navigate to Appearance and Editor. There are many *.php files and footer.php is the file I need. Open that file and find </body> line somewhere on the end. Place your new code right above that line and Save changes. This way my work about Google Analytics is done.
To check your code follow your Google Analytics dashboard in Real Time.

I check my code from Desktop PC and from Mobile device, and all looks OK. It may take some time for code to work, so be patient and wait for about 5 – 10 minutes. If you can’t wait and want to see if you done all right go to your page and – in Chrome – make a right click. Choose View Page Source and scroll all the way down. There you should see your Google Analytics code.
Important notice: Steps I wrote above only applies for Desktop and Responsive themes. In case you use some WordPress plugin to show Mobile and Tablet theme design then you need to find footer.php of those plugins also.
Thanks for reading my blog, and if you have any questions please don’t hesitate to write a comment.

8 thoughts on “Best way to add Analytics code into WordPress site

  1. zapatillas salomon gore tex baratas


    zapatillas salomon gore tex baratas

    Valuable info. Lucky me I found your site by accident, and I'm shocked why this coincidence did not happened earlier! I bookmarked it.

  2. españa

    Reply españa

    I have not checked in here for some time because I thought it was getting boring, but the last several posts are great quality so I guess I will add you back to my daily bloglist. You deserve it friend 🙂

  3. bota salomon

    My brother recommended I might like this web site. He was totally right. This post truly made my day. You cann't imagine just how much time I had spent for this information! Thanks!

  4. timberland mujer


    timberland mujer

    I carry on listening to the reports talk about receiving free online grant applications so I have been looking around for the top site to get one. Could you tell me please, where could i acquire some?

  5. timberland hombre


    timberland hombre

    Hello, i think that i saw you visited my web site thus i came to eturn the favor?I'm trying to find things to enhance my website!I suppose its ok to use some of your ideas!!

  6. timberland rosas


    timberland rosas

    I don抰 even know how I ended up here, but I thought this post was great. I do not know who you are but definitely you're going to a famous blogger if you are not already 😉 Cheers!

  7. christian louboutin espana


    christian louboutin espana

    Good web site! I really love how it is easy on my eyes and the data are well written. I am wondering how I might be notified whenever a new post has been made. I've subscribed to your feed which must do the trick! Have a great day!

Add Comment