How to set up Google Analytics

Marketing your website can be a massive investment, but also one that can be easily tracked in order to see if your investment has been worthwhile. One free tool which can be used in order to see this data is Google Analytics. The basic setup of Google Analytics tracking is fairly simple and can be found here. There should also be a walkthrough of this when you first create your Google Analytics account.

In this guide we’re going to look at how to set up your properties in order to get the most out of Analytics. This will presume that you’ve not made any customisations already and you’ve already added the basic tracking code.

Please note: Changes will only affect future data, previous data will be unaffected by any changes you make.

Step 1: Set Up Goals

One of the first things to consider is what actions are the most the most important for you website, this will usually be an action which pushes the user down the sales funnel, whether it’s signing up to a newsletter, submitting an enquiry form or buying something directly from your website. You may also want to be able to see when a user tries to contact you via phone or email too.

All these can be set up within Google Analytics via Goals and Ecommerce tracking. To get to the view in order to see the Goals section you can follow these instructions:

  1. Navigate to the admin area (Cog at the bottom left)
  2. Goals can then be seen within the third column.

1a: Destination Goals

Destination goals are possibly the easiest to set up, however they are limited to the fact that your website user will need to be redirected to different page when they complete the desired action. In order to set up the goals all you need to know is the page url that the user will land on when they’ve completed the desired action.

  1. Click the red “New Goal” button
  2. Give the goal a meaningful name
  3. Select the type “Destination”
  4. Click “Continue”
  5. Enter the page url path (don’t include your domain) into the destination text box.
  6. Click “Save”

Your destination style goal should now be set up. You can also add values to your goals if you want to add a monetary value to the users action, or add a funnel if you know the different urls a user has to go through in order to reach a goal. Funnel tracking can be especially useful if you’re tracking a multipage form as it will let you know if users are leaving the form on a particular page.

1b: Event Goals

Event goals can be a bit harder to setup and may require some help from a developer. These do have the added benefit that the user doesn’t have to leave the page to activate them. This makes it useful for tracking AJAX forms or things such as call and email link tracking.

Before you do this event tracking will need to be set up, you may need this to be set up bespokely so we would recommend giving this guide to your developer.

We have set up a number of different event tracking for different systems and here are some of the most common code snippets that we use in order to achieve event tracking.

Please Note: If your tracking code has a name ‘send’ will need to be appended with this so it will be ‘name.send’.

Call & Email Tracking

The following code will add event tracking for any link on your website which points to an email address or phone number. This should be placed within a document ready event.


//Call and phone tracking
jQuery('a[href^="tel:"]').click(function() {
ga( 'send', 'event', 'Call', 'Click', jQuery(this).attr("href") );
});
jQuery('a[href^="mailto:"]').click(function() {
ga( 'send', 'event', 'Email', 'Click', jQuery(this).attr("href") );
});

Once you have set up this part of the tracking the events will start pulling into Google Analytics within the Behaviour section. This can give you some great insights, however your Goals won’t be pulled through as of yet. To set it up as a Goal you will need to go to the Goal section in the admin area and follow these instructions:

  1. Click the red “New Goal” button
  2. Give the goal a meaningful name
  3. Select the type “Event”
  4. Click “Continue”
  5. Enter values for Category and Action, these are the second and third parameters within the event tracking code.
  6. (Optional) Add a label or value to drill down your goal further. This could be good if you want to track different forms or only want include certain phone numbers in your call link tracking.
  7. Click “Save”

Your event tracking goal should now be set up.

1c: Ecommerce Tracking

Ecommerce tracking is slightly different to the other goals and will require a developer input in order to set up. If you’re using a common CMS then you may want to see if any plugins exist which can add this for you. There are 2 different ways this can be set and Google’s guide for these can be found here.

Once the tracking is setup it will then need to be set up in the admin area and can easy be turned on within the “Ecommerce Sections” also found in the third column of the admin page.

If you’ve used enhanced ecommerce tracking then this can also be turned on in this section and the checkout funnel can also be added. Funnel tracking will allow you to be able to see which sections of the checkout your users are most likely to abandon on.

Step 2: View Settings

Once your goals have been setup we recommend next looking at view settings. We recommend checking the following are correct:

  • View Name – We recommend leaving this as “All Web Site Data”, this will become more apparent as to why in the next step.
  • Website’s URL – Make sure this is your website and the correct protocol has been selected.
  • Time zone country or territory – make sure this is set to the main target for the website.
  • Currency displayed as – make sure that this matches what you want to use. Please note that Google Analytics does not handle any exchange rates and just imports the numbers submitted.
  • Bot Filtering – Leave this unchecked for now.
    Site search Tracking – If your website has search functionalities you should enable this and enter the parameter used for search.

Remember to hit save if you’ve made any changes to these.

Step 3: Create A Filtered View

At this point you will want to create a filtered view. It’s important to have both a filtered and unfiltered view so that you can test new functions without affecting the data used to make key decisions. The filtered view will be setup in order to block out your activity on the website.

In order to setup your new view you need to follow these steps:

  1. Go to the admin area in Google Analytics.
  2. Within your “All Web Site Data” view, go to View Settings.
  3. In the top right there should be an option to Copy View, click this.
  4. Change the name to “Filtered View”
  5. Click Copy View

Your new view should now be created and selected. If you’d like to change between views this can be done by clicking on the view name in the top left of the screen. This will show all the accounts, properties and views associated with your Google account.

The reason why we recommend copying the view over creating a new view is, that this will copy over all the settings including Goals. If you create a new view manually you will need to re add these.

Within your new view you will want to go into the view settings and make sure that Bot Filtering is enabled. This will reduce the amount of traffic showing which isn’t actually real people.

You will then want to set up filtering blocking your IP address. You will need to do this within the “Filters” section at View level (Third column). To set this up you will need the IP address of the people you want to block. We would recommend blocking the IP address of anyone who will be working on your website, such as your staff or any agencies used. To do this you will need their IP addresses and will need to make sure that it’s a static IP address (overwise the IP address changes and the filter is pointless). Here’s how to set up the filters:

  • Click the red “Add Filter” link.
  • Add a filter name, we would recommend using “Block” followed by the name of the office/agency.
  • Leave the Filter Type as Predefined.
  • On the “Select filter type” dropdown select “Exclude”.
  • On the “Select source or destination” dropdown select “traffic from the IP addresses”.
  • On the “Select expression” dropdown select “that are equal to”
  • You should then enter the IP address you want to stop being included in your data inb the IP address text box. If you need to find your IP address this can be found by Googling “What is my IP address”.
  • Click Save.

Your filtered view is now setup. We would recommend using this view for completing any analysis on your website.

(Optional) Step 4: Link Google Ads

If you’re using Google Ads (previously named AdWords) then you will want to link your Google Analytics and Google Ads accounts together. To do this you will need to have both Google Analytics and Google Ads within the same accounts. Linking these is really simple and can be done by going to the main admin view within Google Analytics and at Property level (Second column) selecting Google Ads Linking. You can then follow the on screen instructions in order to link these together.

This comes with the added bonus of allowing you to import your Analytics goals to AdWords, meaning that conversion tracking within Google Ads is much easier to implement and won’t require any further code snippets adding to your website.

Your Google Analytics account should now be fully setup in order to give you the most meaningful data. If you require further help with setting up your Google Analytics account or would like some help analysing your website then please get in with our team.

Sign Up To Our Newsletter