google-analytics

Google Analytics is a completely free service provided by Google that allows you to get better insights into the traffic and visitors your website, app, marketing campaign or landing page gets. It’s super easy to setup, is extremely low profile and doesn’t impact your load times at all. If you’ve never setup Google Analytics before, or if it’s been a while and you haven’t had time to look over all the new features, this tutorial will give you all the basics in setting up your website and all settings correctly. This doesn’t cover how to use the insights once setup, but we’ll cover that for you in a later post (it’s pretty simple, though). One pre-requisite you’ll need is to at least have a Google account, which I’m sure you do have. If you have a Gmail address, you have a Google account.

1. Log into Google Analytics

The first step is to access Google Analytics. You do this by going to the following address: http://www.google.com/analytics/ . Once there, you’ll have to access the system, but clicking on the “Access Google Analytics” button in the top right corner.

Google Analytics 1 - Go to URL

No matter if you are logged into your Google account or not, you’ll need to log in to Google to continue. So, do that!

Google Analytics 2 - Sign In

If you’ve never used Google Analytics before you’ll be greeted with a landing page of some simple preferences. These mostly deal with feedback and support for and from Google Analytics and it’s fine to just keep what’s set there automatically the same and click on “save preferences”

Google Analytics 3 - Inital Settings

Once you’ve done that you’ll be taken to the main Google Analytics homepage, which is where you’ll have all of your accounts or websites listed that you are tracking. This will always be your starting point when logging in to analytics.

Google Analytics 4 - Dashboard

2. Access the Admin Panel

The admin panel is where you will do all of your setting up and configuring. You’ll add in new websites or landing pages, setup users, properties, and a wide range of other settings. Below is a screenshot of what your dashboard might look like. Keep in mind that if you haven’t added any resources to it, you won’t have any content here but the first option to create a new account. It’s simple to get to the admin panel, you simply click on the Admin link that’s in the main link bar across the top of the page.

Google Analytics 5 - Admin Page

I want to stop here and take a minute to explain something that seems confusing to a lot of people, and for good reason. Because of the wide range of possibilities that Google Analytics offers, they’ve had to structure things in a way that might seem overkill or confusing if all you are doing is adding your website so that it’s visitors can be tracked. The way everything works is as follows:

Google Analytics is broken into 3 sections, Accounts, Properties and Views. Each one plays an important role in how you setup your analytics and the content you are setting up might change the way you use properties vs. views. Here is what each of these mean.

Accounts - This is the main classification for Google Analytics and works as an organizational tool. It’s made so that you can breakdown your properties by accounts so that some are associated with different accounts. This is important for collaboration reasons. Let’s say you have a team that manages all the websites, apps and landing pages for a certain company. You’d setup an account just for that company so that all the management can be done from the account level and all of your properties from everything else isn’t mixed together. You are also limited in the number of properties you can have per account, so if you plan to monitor a lot of endpoints, planning out your accounts will be an important step.

Properties - A property is the actual object you are tracking with Google Analytics. This could be a website (most common), an app or even a landing page. Once a property is setup you have all the same options for that property as you would for an account, such as adding users, and you’ll get a lot more options in regards to linking accounts, setting up social media and so on. We’ll be covering all this down in this tutorial so sit tight!

Views - This is simply ways that you can view data from your property. You get one view automatically created when you setup a new property and you can add views later that will drill down to certain points you’ll like to monitor more closely. We’ll expand on this later down as well.

Google Analytics 5 - Admin Page

3. Create an Account

You’ll want to start by creating an account. This will be the central hub of all your analytical workings and is important in setting the structure of how your properties will play out. You can do this by clicking on the drop-down menu under “Accounts” and clicking on “Create new account”. Don’t worry if you don’t have any accounts listed, this is simply because you’ve not set any up yet! You’ll also notice it shows how many accounts you are using out of a maximum. That’s important because there are limitation to how much “free” they give you. You are limited to 100 accounts with 100 accounts and 50 properties per account, so plan ahead in your organization.

Google Analytics 5 - Admin Page-2

Once you’ve done that you’ll be taken to the “Create a new account” page. The first thing you’ll need to choose is if what you are adding is going to be a website or mobile app. For this tutorial we are going to use website. Next you’ll start by setting up your basic information.

Google Analytics 6 - New Account Screen

Account Name – This is just the naming convention you want to use for your account. Let’s say, for instance, this account will be to manage all sites and landing pages for the company “Widgets Unlimited”. Then you’d put something like “Widgets Unlimited” here.

Property Name – This will be the name of your first website to be tracked on this account. So, if the main website for “Widgets Unlimited” is www.wegotwidgets.com, then you could put something like “WeGotWidgets.com”

Website URL – This will be the actual URL that points to your website. You first have to choose either “http” or “https” with the drop-down, then you fill in your actual address. For our demo, we don’t use SSL, so we’ll leave “http” and well put in our address, which is “www.wegotwidgets.com”

Industry and Timezone – The next settings will be industry and timezone. Do your best to find an industry that is close to what you are offering but it’s not 100% crucial here. The main benefit you’ll get from this is demographic information on your tracking. Like, age, sex and interest of visitors coming to your site. The next is simply telling Google what timezone you website is mainly setup on. That way, if it’s 2pm your time, but someone from a country hits your site and it happens to be 10am, it will show the hit in your local timezone instead of theirs.

Data Sharing Settings – These are the setting that allow Google to share your information with other Google resources and teams. I recommend keeping all of these items checked as it could be valuable when adding in Google Ad-Words, or if you need to reach out to customer support. If you are super worried about privacy and data security you can always un-check these and nothing will be shared.

Google Analytics 8 - New Account Screen 3

After you’ve got all of your options setup, Click on the Get Tracking ID button that is blue and located at the bottom left hand corner of the screen to get started on the next step.

4. Setup your tracking code

Once you click on the “get Tracking ID” button it will take you to the tab on your property admin (remember, the property was automatically generated for you when you added your account, because every account needs at least one property) that allows you to set up your tracking code. I’ll show you the screen shots and then explain to you what you are setting and how to set everything up.

Google Analytics 9 - Account Tracking ID Screen Google Analytics 10 - Account Tracking ID 2

So, from looking at the images there are some things you can tell right off the back. One, they give you JavaScript code that you can add to the bottom of every page of your website, which is fine! Their next options are more geared towards websites that aren’t static and that have a more fluxing number of pages or use dynamic content (such as WordPress, or any CMS / Shopping Cart / etc).

Let’s first break down what the tracking code is, and then I’ll tell you the easiest way to use it, and the way we use it here at Tiller Phish.  here is a snippet of the Google Tracking Code:

<script>
 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

 ga('create', 'UA-YOUR NUMBER HERE', 'auto');
 ga('send', 'pageview');

</script>

The first section of the code you probably can’t understand, and that’s fine! It’s been minified and obstructed so that it’s not really clear what’s happening on purpose, and also to reduce byte size and load times. What’s important here is the bottom two lines. These are parameters that you are giving to Google Analytics to tell them what property you are tracking and how you want it to be tracked. If you are not tracking things like eCommerce sales and some more advanced tracking, the above will be fine. The first parameter is created the instance with your provided Property ID, the next is telling Analytics what type of information to send back to Google. The “pageview” is a blanket parameter for the send command that will send almost any information that you will need, aside from things like eCommerce.

There are several ways to do this as stated on the Google Analytics site, and here is an easier to understand explanation of those choices.

  • First, you could add this code directly into every page of your website. This can be done in the <head></head> of your document or in the body, right before the close of the <body> tag. The latter is the recommended way if you are going to place the code in static pages because you’ll want this JavaScript library to load after everything else in your site has loaded. This will keep you from seeing any type of possible slow down.
  • Next, If you are using WordPress you could opt into one of the many plugins to manage your Google Analytics. I recommend using SEO Tools by Yoast. They have a complete solution in terms of SEO, and integrating your Google Analytics is part of it’s features. Another thing you can do with WordPress is to add in the code yourself. If you to go Appearance > Editor you’ll find the section to edit each page of your template. Open the ‘footer.php’ file and place your code before the ending <body> tag. There is a downside to this though, because themes get updated if you did not create the theme yourself. So, if your theme updates, it could erase over what you’ve done to the ‘footer.php’ document. You could always place it back in after your theme updates.
  • If you have a website that is managed by yourself or another content management system, you’ll want to add in your code, but do it in a way that doesn’t mean you repeating the code on every single page. What I like to do is to create a “bottom_includes.php” file kinda like WordPress themes do. I’ll place all the bottom loading JavaScript as well as the Google Analytics code and then use a php include to add this page dynamically to each page without having to repeat it. The code would look something like this: <?php require_once('bottom_includes.php'); ?>

Now that you’ve got your code setup we’ll move on to some other functions you have available. We’ll go back to the Account Properties so that we can add some users to your account.

5. Add users to your account

One thing you’ll want to do is add users to your account or property. There are many reasons, some include collaboration, or maybe you are running the analytics for a client and you’d like to give them access to the tracking but not necessarily give them the option to change the settings.

Google Analytics 11 - Account User Management

You add users by their email address. It doesn’t have to be their Google address, as once they click on the link to accept, they will be asked to log into their Google account anyway. Some of the options you can give to users is if they have full access, access to just certain properties or what they are allowed to view or manage. There are several levels and you should play around with a few. You can give users access to collaborate with other users, to read & analyze or even to edit settings or edit other users.

6. Property Settings

The next thing you’ll want to do is to check out all of your property settings. By default when you create an account you are created a property to go along with it. This will be your main property for your Account, and if you’d like you can add more properties. These can be landing pages, apps, or a wide variety of other things. I actually use properties to manage my Analytics on a client level, so that I don’t have to have an Account for each client.

Google Analytics 12 - Account Property Settings

The first part of your Property settings will be generic settings like your property name (default is the web address), your default URL, the default view (a default view is created when you create an account or property) and the Industry that you chose when you created your account.

Google Analytics 13 - Account Property Settings 2

The next set of features are geared towards advertisers. The first one is explicitly called “Advertisers Features”. I would recommend not enabling this unless you know you will be able to include the proper policies and terms and conditions on your website because of the additional level of security it poses on the end user. The next is to enable Demographics. If you are setting this up before 2014 (I’m assuming you are since this was written in 2015) this option will be check automatically and I recommend you keep it this way. It doesn’t affect performance at all and gives valuable information like age, sex and interest.

Google Analytics 14 - Account Property Settings 3

The final section of the Account Settings page give you two more options. One being how to display the in page link stats. This is a part of Google Analytics that allows you to pull up your website and it show a heat style map of where and how many times people are clicking on your content. They give you the option of Embedded mode and full mode. You shouldn’t have to change this unless you are using an outdated version of Firefox or Internet Explorer. If you are, than you’ll have problems and will want to choose full screen mode. The next is the option to integrate Google Webmaster Tools. If you’ve already setup your site on Google Webmaster tools (don’t worry, I’ll be doing a how-to for that as well, and will link it here when I’m done). you can click edit, it will open a link to all of your Google Webmaster Tools sites and let you choose which one you want to associate.

Google Analytics 15 - Webmasters List

Once you’ve picked the right listing it will ask you to verify that this is the right site to be linked, then it will take you back to the same page you were at before and show the new Webmaster Tools link.

Google Analytics 16 - Webmasters Confirm Google Analytics 17 - Webmasters Linked

7. Setup other search sources

The next thing you’ll want to do is setup other search sources so that Google can give you extra information about these, such as search terms and what not. You can do this by going through the Tracking Info tab that’s down a few from the Property Settings tab. Once there you’ll want to go to “Organic Search Sources”. Once there you might not see any info in the list and that’s OK, because you haven’t set any up yet! Click on the “Add Search Engine” button.

Google Analytics 18 - Property Search Sources Page

Once there you’ll see a few options to get a site setup. We’ll use Microsoft Bing to set one up so you can see how it all works.

Google Analytics 19 - Property Search Sources Add Bing

The first thing you’ll want to do is put in a name and a domain name. For our example we’ll put Microsoft Bing as the name and bing.com as the “domain name contains” because we know that the Bing URL is bing.com… For the next options we’ll have to go to Bing to find out exactly what they are.

Google Analytics 20 - Bing

Once you are there, you’ll want to search for something.. anything. It doesn’t matter what because you aren’t going to be using the results. So, for this I just searched for “something”. This will allow us to pull the parameters we need from the URL it generates.

Google Analytics 21 - Bing Search

So what we are needing here is the path it creates and the paramenter in that path that it uses for it’s keywords. The path for this is “search?q=” and the parameter is “q”. Here is what it looks like filled out>

Google Analytics 22 - Property Search Sources Additional Settings

After that you just click on the create button and it will take you back to your list of search sources like below

Google Analytics 23 - Property Search Sources Finished

8. Setup Social Links

The very last tab under your Property is Social Settings, this will allow you to integrate some social media to help Google Analytic better understand traffic flow. Once you’re there the first thing you’ll see is a few text fields that will allow you to put your social URLs.

Google Analytics 25 - Social Settings

If you run out of room you can keep clicking the “add” button to put in more fields for you to fill out. I recommend putting any and all social media outlets that you might use, because this information can be very valuable, especially if you are sharing a lot of content from your site to social media. Once you’re done you’ll have to the option to Apply, which will save these settings.

Google Analytics 26 - Social Settings 2

Finish!

I won’t be going into details on views and setting them up because I think they are out of the scope of doing a basic Google Analytics setup, but if it’s requested I’ll do a post that details more of the advanced features you can play with and setup. If you have any questions or input feel free to leave us a comment and we will reply as soon as possible!

Leave a Reply