The Only World-Standard SEO Software


Download Now
SEO PowerSuite
SEO PowerSuite Hot-new version
Supported OS

Google Analytics in Very Plain Language (Part I)

| Posted in category Analytics Google

SEO NinjaHi there to all aspiring SEO ninjas! During several upcoming weeks we are going to get through the basics of Google Analytics (GA) set up, fine tuning, and typical use cases. All the well-read SEOs are already scratching their neck with a skeptical: “Hmm, any news here? I’d rather read Official Google Analytics Blog.” While Official GA Blog updates you on each and every feature of the tool it does have one drawback – it’s not intended for the white belts.

"Google Analytics is the enterprise-class web analytics solution that gives you rich insights into your website traffic and marketing effectiveness."
By Google



In our first training session you will learn:

  • How to sign up for GA and grab your code
  • What to do with GA code

How to sign up for GA and grab your code

Get an account with Google Analytics
Visit GA website. Click on Sign Up Now link in the right upper corner. If you already have an account with Google, use your login and password to sign in, else, click on Create an account now link.Google Analytics Login Page
On one of the steps you will be prompted to provide the information about your website:

  • Website’s URL (Make sure you spell it correctly :). In fact, this field is not very important because GA tracks user account number)
  • Account name (make it descriptive, if you are tracking a lot of websites, it would be a challenge to identify what website stands for New_Account_01)
  • Country and time zone (make sure you provide valid information here, remember, when it’s 4 p.m. Wednesday in Tokyo, guys in San Francisco are still seeing their Tuesday night dreams. Good timing is important for your reports)


Google Analytics Settings

Then you will have to input your name and country of residence – piece of cake.

Finally, you approach the screen containing your GA code. Google currently offers three main varieties of GA code:

  • Single domain
  • One domain with multiple subdomains
  • Multiple top-level domains

We are going to answer your What? and Why? questions regarding this step in subsequent Parts of GA posts. In most cases default code will suit you.

What to do with GA code

Sample GA code:

< script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-11111111-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
< /script>

You have to incorporate this code to every page of your site that you wish to track. Google recommends putting the code before closing < / head > html tag; in rare cases java script may shatter the layout of your pages if pasted before < / head >. If by some misfortune this is your case, you may either place GA code right before < / body > or try to split it in two parts:

These strings go before < / head >:

< script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-11111111-1']);
_gaq.push(['_trackPageview']);

< /script>

And these – before < / body >:

< script type="text/javascript">

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

< /script>

Alternatively, you may also paste both parts of the code before < / body >.

If you have a sort of IT support in your team or your site is managed by a webmaster, pass them on the code and you are done with this step. If you are a DIY guy – read on.

At this point we need to find out what engine is under the hood of your website. There may be two options:

  • You don’t have a CMS
  • You have a CMS (content management system)

You don’t’ have a CMS

If you don’t have a CMS you may see all the pages of your website on your server as separate, individual files, e.g. index.html, products.html, and etc. You may edit them in any way, but in most cases the changes apply only to the page that you have edited.

How to deal with a website that has no CMS:

  • Get an FTP client (this a piece of software that lets you connect to a remote server – read computer – and upload, download, and edit files there). If you don’t have an FTP app and have no idea, where to get it, visit Filezilla Project and download Filezilla FTP client; Filezilla is absolutely free and it may be installed on Linux, Windows or Mac.
  • Install the FTP client
  • Connect to your remote server Your ISP or hoster should have provided you: server name (IP), user name, and password for FTP access. Fill in this information in the respective fields of Filezilla
  • Filezilla Interface

  • You may download, upload, and edit files now. Filezilla operates mostly like any desktop file manager. It will be fairly easy to locate the files/pages, where you want to insert GA tracking code. Open the respective files with a text editor of your choice and insert the tracking code as described above. To speed up the process use Ctrl+F < / head > or Ctrl+F < / body >. When finished, view the pages in your browser; make sure the layout remained intact.
  • Filezilla_Interface_02

  • Visit your GA account and check if the status of your GA account changed to Receiving Data. (Login to GA, select a GA account, and click Edit link)

GA_receiving_data

Finish! GA is now collecting traffic data for your site. You may log in later to view the traffic reports.

You have a CMS

Content Management System (CMS) is a piece of software that lets you create, edit, and manage pages and virtually any content of your website without any third-party applications. There are dozens of free and paid CMS available on the market. As an example, we will be using WordPress; it’s a user-friendly CMS that deservedly enjoys popularity among millions of users.

How to deal with a website that has CMS (e.g. WordPress):

  • Login to the control panel of the CMS (you’d need login page URL, username, and password)
  • Locate template editor (in WordPress Appearance – Editor)
  • Edit Header and/or Footer, insert GA tracking code and save changes. The changes will apply to all the pages of your site

WP_01

  • View the pages in your browser; make sure the layout remained intact
  • Visit your GA account and check if the status of your GA account changed to Receiving Data. (Login to GA, select a GA account, and click Edit link)

Alternatively you may use one of numerous SEO plugins that provide smooth GA analytics integration, e.g. HeadSpace 2 SEO (for WordPress):

  • Install the plugin
  • Go to settings page
  • Enter your GA account ID in a respective field, and
  • Save changes

SEO_plugin

If things are going right, in a few hours you will get first traffic reports in your GA account. Play around and analyze.

In the next post we are going to learn how to use filters and set up goals conversion for your site.

Any questions regarding GA set up are always welcome!

Other posts on GA:



back to SEO blog