Google Analytics – Setup

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.