How to Install Google Analytics Tracking Code in WordPress

How to Install Google Analytics Tracking Code in WordPress


hello and welcome back again in this
video session I’m going to quickly show you how to install Google Analytics tracking
code on a WordPress site simply we open up your favorite internet
browser and and simply log into your Google
Analytics account surely if you do not have Google
Analytics account I made a video tutorial that takes you
step-by-step showing you had to create one ok so I will presume that you already have
Google Analytics account and you just want to install your
tracking code on a wordpress site don’t worry it’s
pretty simple and I’ll also a give you couple hints keeps
and as to concede the certain elements while you installing your tracking code on your
WordPress site so basically load your Analytics
account then locate menu option named admin press on it then will give
you this interface because this is the latest interface for 2014 locate your analytics and under your
property option you will have this menu option simply press on tracking info then locate tracking code then simply copy the JavaScript it gives you and then simply log into your WordPress site ok and on the left hand side you have
Appearance panel here then locate it and go into editor press on it and once you do
there you have and issue template files and files that fire your WordPress site right near most templates use header dot PHP file ok simply locate that and press on it so that you can now edit it now where you should place this code is locate the end of yes the head element so simply locate that just on the WordPress head function ok and just simply paste the code yet you’ve just copied from analytics
that’s where it goes now this is universal tracking code can
show you may have the classic tracking code makes no
difference it still does there some people will
tell you that you should place it all inside the body
element or in the footer element and so on that’s correct you can split
this code if its a synchronous code that you have
which is the universal tracking code right but I strongly encourage you to
simply places it there and forget about splitting and worrying about like where should place the code ok instead focus your energy on creating
great content instead of wasting your time thinking
about oh where should I place the code n so on ok the Google Analytics tracking code goes just before the closing of your head element here ok because this is
header file that means once you save your changes
now once you save that file now if you were to go and
refresh your homepage and let’s look at the
source code control u on Firefox now you will see that our tracking code is installed and regardless of which page that you visit it should be there as well as we can
see it’s there now what will happen is you’ve basically installed Google
tracking code on a WordPress site it is that simple and that’s all there is to it once again I
don’t worry about splitting and all that stuff Ok that’s where the code goes and if you
want to subscribe to my channel please go ahead and do so because I have
some useful videos where you can learn how to take an advantage of Google Analytics and I’ve made video tutorials in such way that every webmaster regardless of their
technical skills can benefit from such as: events tracking I will make more videos
for you for that how to create goals how to conduct a/b testing and experiments
and so on and how to really use Google Analytics
because it can be quite overwhelming if you
just started learning how to use Google Analytics Ok but I will make the
whole process very easy for you so simply subscribe and I’ll talk to
you very soon thank you very much happy rankings thank you bye bye

100 comments

  1. Thanks for the video,But I would like to know .If you add a new pages,Will it have this code the automatically on the new pages,or do I have to something like re add the code this way 

  2. Hello…this video is great…and very simple… though i have a query, i have a wordpress blog, and am not getting the 'editor 'option in appreance…. please help..

  3. Great info.  However, on the Edit Themes page of my wordpress admin site the "Update File" button does not appear.  I have a message that says: "You need to make this file writable before you can save your changes. See the Codex for more information."  I have no idea what this means.  Do you have another video that would show me how to make the file writable?

  4. still like your video it was easier but i cannot find where the editor is placed! I''m using newgen theme wordpress 3.9! Please Help!

  5. When I copy the code to my site in the header it does not give me a "update file" option.  Then when I click away form the header and back to it the code is gone.

  6. Hi ! I already see your tutorial abouthow insert an google analitycs code on a wordpress blog. Thank you ! It was very usefull to me. I subsribe too on your chanell.
    I begin to use an autoresponder from "Get Response" and after I make an "webform" they give me a code to insert in all the pages… how can I do this? you have a tutorial for this?  Thanks again !

  7. Hey, i added the code to my header.php in wordpress. I placed it above the end of wordpress head, but it says tracking not installed.
    Do i have to wait a couple hours?
    Thanks

  8. @rankyaseoservices Hey, i've followed your steps but im still having an issue with it. I use godaddy's website builder and i've tried finding the HTML/source code for all my pages but didnt find any. Then i the site settings i found something which said "Site-wide Code: code to put between <HEAD> tags(all pages)" so i put it in there(the tracker code) but google still hasnt installed it, i hope you can help me out im just really confused now. thanks ! 🙂

  9. I have found the php wp code but the header code isn't listed underneath it like in your video. So where do I post my analytics coding? 

  10. hi ranky,

    thanks for a prompt reply. I've checked out the link you have given me and it seem I've already done that.
    What I'm looking to do is verify the site again under https. www. has already been verified in wordpress.com using the method you've suggested. The reason for this is when trying to view data in webmaster tools, it tell me this information is not available and directs me towards this support tool :
    https://support.google.com/webmasters/answer/96568#2 'If data is missing or appears out of date' section.
    therefore, im trying to get the site verified under both www. and https, if that makes sense? 
    or maybe im doing this wrong, thanks a lot for your help, much appreciated.

  11. hello!.. I have a website , It has cpanel and with wordpress theme(powermag). I do have a google analytics account. it says the tracking code mismatch. what will i do? tnx

  12. Great information and video. I was successful inserting the Google Analytics code, and I didn't realize it was so easy. Now I know just a little more about using the editor in Word Press. AMAZING!

  13. Thanks for the video – and making it easy! Don't know if you can help but I got the code in as shown however when I 'view source' I actually have an additional: </noscript> before my <script> begins. I can't see why as mine looks the same as yours in the header.php, but it also is still showing in my analytics account as status: 'tracking not installed'. So guessing there's something going on. Any ideas?

  14. Great tutorial! In my case using a theme with the front end editor, the header file in WP dashboard only has the script "//intentionally left blank". Does this mean I can post the script in anyway or would I need to create a head tag then place it within the tag?

  15. Thanks for the Great Video indeed.Can you please explain me on How to insert a Google Analytics Code on a Free WordPress website…I have been endlessly trying to do that without much luck !!!

    Thanks in Advance

  16. I always install the GA code in the html widget but then it shows up on my pages. I don't know if my WordPress site has a editor.

  17. hello !! i wanna ask you !! i have 2 websites should i work with one google account for all my websites or an acount for each website what's good for seo ?! thanks

  18. I want to add social profiles in my site's knowledge graph so that whenever I google my site i may get to see social profile links too in the knowledge graph.
    Help me with this

  19. Thank you for the video. There is something bothering me. Will this code still be there if the theme I use will get an update?

  20. Awsome! Thanks

    Some videos suggest that you should use a plugin for this task.

    Any pros and cons in doing this?

    I am not a fan of installing too many plugins.

  21. IAM GETTING THIS ERROR WHEN IAM UPDATING THE CODE. KINDLY HELP ME WITH THAT ISSUE.

    Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.

  22. One quick question. I understand that I need to update this on header.php right? But should I be editing just the child-theme? And in the child-theme, there is no header.php. If I edit the header.php in parent theme, I'm afraid there will be something wrong with the WP later. Hope you can answer me 🙂

  23. You are very smart good video and very useful you are the best Rankya I wish you luck …waiting for more from you …thanks in advance

  24. Hi , i want use header.php file to instale some codes but its nearly empty , i didnt found html just some lignes ,why plz ?

Leave a Reply

Your email address will not be published. Required fields are marked *