Google Analytics is a free application offered by Google that allows you to track your website visitors and get in-depth analysis and reports on your website. To use Google Analytics, you just need to have a Google account, and if you already have a Gmail account or YouTube account, then you can probably use that same information to set up Google Analytics.
[evp width=”640″ height=”480″]tutorials/wpvideos/google-analytics-setup.swf[/evp]
Using your Google account and your Google password, just sign in to Google Analytics and you will have to sign up again for Google Analytics, so just click on Sign Up here.
And the first thing you need to put in here is your website URL, so Iâ€™m gonna put in my website URLâ€¦and also to give your account a name.
Okay, and then you can select your time zone or territory, and also your time zone according to your local time, and then click on Continue.
Then provide Google with your last name and your first name, and then select a country or territory. Then click on Continue.
You can read through the Terms of Service for Google Analytics, and if youâ€™ll agree, click on â€˜Yes, I agree to the terms and conditions,â€™ and then click on Create New Account. And there are several options here to track your website â€“ you can either track a single domain, or you can track one domain with multiple subdomains, or you can also track multiple top-level domains. And if youâ€™re a Google AdWords user, then you may want to combine your AdWords data with your Analytics data. Iâ€™m gonna leave that blank for now.
So this is the code that you need to copy and paste into your WordPress blog or your website. Now, Iâ€™m gonna show you how to do that.
In your WordPress dashboard, just click on Appearance and click on Editor to edit the current theme that you are using. All your theme files should be made writable, so if you see a message like this that says, â€œYou need to make this file writableâ€¦â€ then you need to set the correct permission settings via FTP to your WordPress theme.
So using your FTP account, you just need to click on wp-content, and then go to the Themes folder, and then look for the theme that youâ€™re currently using. So in this example, Iâ€™m using the default theme, and Iâ€™m going to select all the files hereâ€¦right-click, and choose File permissions. And then Iâ€™m going to set this to â€˜777â€™.
Now, Iâ€™m going to refresh this page, and if you scroll down, youâ€™ll see now thereâ€™s an Update File button, which means your files are now editable. So you need to look for the Footer file, which is footer.php. Click on that file, and I can see my footer.php file is open in this window; so what Iâ€™m going to do is copy this code from Google Analytics, go back to my WordPress dashboard, and then right before this tag here â€“ this body tag â€“ Iâ€™m gonna paste the entire code here. And then Iâ€™m gonna click on Update File.
Next, Iâ€™m gonna go back to Google Analytics, and Iâ€™m gonna click on Save and Finish. So now you can see that my website has been added to Google Analytics, but you see a warning message here, which means that Analytics is not able to pick up your website URL, and therefore, it wouldnâ€™t be able to report the stats. Of course, this status will be updated in a few hours, but if you really wanna check, you can just click on Edit, and then click on Check Status.
So here, you can see the message from Google, saying that â€œAnalytics has been successfully installed and data is being gathered now.â€ So if you check back in 24 hours, youâ€™ll be able to see some very useful statistics and insights to your web traffic.