how to setup google analytics

How to Setup Google Analytics


Setting up Google Analytics is simple and a no-brainer for your business. It is free and gives you valuable insights into what your site visitors are doing. We’re going to walk you through not only how to set up Google Analytics, but why you should and what to do to get the most value out of it. You should use Google Analytics for your business, and you should use it right by setting up goals, funnels, events, and dashboards.

Why Should You Use Google Analytics?

Google Analytics provides you with data about your website visitors. It not only shows you how many people are on your website, it also shows you what pages they view, what pages they entered on, what page they left on, how many people converted, and what traffic source they came from including organic search, referral, and social. You can also see visitor information such as geographic location, browser, operating system, and device used to access the website. All of this insight and data is free with Google Analytics.

Without visitor data you are operating your website blind. If you don’t know how many people are on your site, where they came from, and what they do when they’re on your site, you can’t make intelligent changes. This data is pertinent to optimizing your website, and lucky for you, it’s free and easy to set up.

How to Set Up Google Analytics

  1. Sign up for a free Google Analytics account.
  2. Enter an account name. You’ll want to keep this generic enough to apply to any additional web properties you would want to add to the account in the future.
  3. Enter the website name.
  4. Enter the website URL.
  5. Click “Get Tracking ID” and accept the terms.
  6. Copy the website tracking code and paste it above the </head> tag on every page of your website. If your website is built with a CMS such as WordPress or Drupal you can use a plugin or module and simply enter the Tracking ID in the field provided.

To see just how simple it is, watch this 1 minute video on setting up Google Analytics.

Now It’s Time to Optimize Your Google Analytics Account

So, you got Google Analytics installed on your website. It’s verified and your data is being tracked. That’s great, but you aren’t done. Don’t stop at the beginning, take full advantage of your free Google Analytics account.

Filter Out Internal Traffic

You look at your website often, and that’s great, but you don’t want to skew your data. Filter out your internal IP address so your website visits aren’t counted in the overall numbers. You’ll want to filter out the IP address (or range of IP addresses) at your office so traffic from employees isn’t included either.

To filter out internal traffic on Google Analytics:

  1. Navigate to Admin.
  2. Under View, select Filters.
  3. Click + Add Filter
  4. Name your filter something such as “Exclude Internal Traffic.”
  5. Keep Predefined selected as the Filter Type.
  6. In the Select filter type dropdown, select Exclude.
  7. In the Select source or destination dropdown, select traffic from the IP addresses.
  8. In the Select expression dropdown, select that are equal to.
  9. Next, you’ll need to enter in your IP address. You can find your IP address by going to Google and typing in “What is my IP.” Just copy and paste that into the IP address field.
  10. Click Save.

Watch the video below to see how easy it is to exclude internal traffic from your Google Analytics account.

Add Events

You can track website interactions such as downloads, video plays, and outbound link clicks in Google Analytics with events. Try and identify any items you would want to track as an event and decide on a naming convention for your categories. For example, if all of the videos you track have a category of video (instead of some with video and others with videos, youtube, movie, and animation) your report data will make more sense and provide the most value to you.

If you set up Google Analytics using a plugin or module, events might be automatically created for you. Most Google Analytics plugins can be easily configured to set up event tracking on key elements.

For directions on how to manually configure events in Google Analytics, visit the Google Developers Event Tracking guide.

Setup Goals and Funnels

Having all of your visitor data in Google Analytics is great, but it isn’t very meaningful without goals. It’s important to know what the goal is for your website and track it so you can easily understand the value of each page on your website.

Some goals have a natural flow that the user will likely follow. That process can be setup as a funnel so you can view the full conversion path for the goal. To effectively use the funnels in Google Analytics, determine your goals and create multiple funnels to visualize all conversion paths. Then, just remember to monitor the results!

Determine Your Goals

You need to decide what the goals are for your site. Goals can vary depending on your business model. A vast amount of website actions can be considered a goal, including making a payment, filling out a form, subscribing to a newsletter, playing a video, downloading a file, or sharing content on a social network.

Each of those goals can be configured in Google Analytics. Google Analytics allows you to setup five different types of goals. You can set goals based on a particular page (such as a thank you page after making payment or filling out a form), duration spent on the site, number of pages (or screens on an app) viewed, and events. Events can be added to actions on your site, such as video play buttons and download links.

Google Analytics Goal Types

You need to identify all of your website goals. There will be one overarching goal that is your most important, such as a payment. The primary goal is referred to as a macro conversion. Though macro conversions are important, you don’t want to ignore the smaller conversion points. The smaller conversions are referred to as micro conversions. You need to track both macro and micro conversions to get a complete picture. Google’s Digital Marketing Evangelist, Avinash Kaushik, wrote an article explaining the benefits of focusing on both macro and micro conversions. If you need any further convincing, I’d recommend reading Avinash’s article.

How to Organize Your Goals

You can have twenty goals per profile. (If you need additional goals, create an additional profile.) Goals are arranged in four sets with five goals in each. Justin Cutroni recommends using one set for macro conversions and the remaining sets for micro conversions. This will make the reports easier to digest but you can always create custom reports if you need to organize them differently.

Organizing Macro and Micro Conversions

Visualize All Conversion Paths with Multiple Funnels

Set up your goals and funnels based on what makes the most sense for your website visitors and business goals. It isn’t necessary for every funnel to start with your homepage. You’ll want some funnels to begin with your top landing pages or category pages to get a better idea of how that particular segment performs.

Start the funnel on the most relevant page. If you bypass the homepage, your funnel visualization will be fine-tuned and only include relevant users. Additionally, since you can’t segment funnels, creating them as specific as possible will help you understand those visitors better. For example, if you sell pet supplies you likely have a landing page for dog products and a separate landing page for cat products. Create a funnel focusing on dog owners that begins with the category page for dog products.

If you use a method like this make sure you use a unique goal URL for each funnel. If multiple funnels end with identical destination goal URLs, then irrelevant visitors will appear to enter the funnel on the last step. You can still use one destination by using virtual pageviews, or adding URL parameters.

Monitor Your Funnels

Once everything is configured, you’ll want to remember to monitor your conversion funnels. You need to review your funnel visualizations in order to make informed decisions which ideally will increase conversion rates on your site.

Watch to see if there is a particular place in the funnel where a high percentage of visitors are detouring the desired funnel path. Is there a specific page they are all viewing? Is there useful information on that page that you aren’t providing on your landing page? Try adding that information to your landing page or highlighting it if people are just missing it.

Is there a place in the funnel where everyone exits? Review the page prior and identify any items that could possibly cause friction, areas that could be potential struggles for visitors. Does everyone leave when they see your sign-up form? Try making the form simpler. Remove any fields that aren’t completely necessary.

Determine a schedule to review your funnels. Look where people are leaving and based on your funnel data run split tests to see if you can improve the conversion rate at those points.

Configure Dashboards

Creating dashboards makes it easy to keep track of your key performance indicators and keep an eye on the metrics that matter to you. You can even configure dashboards to be emailed to you or others on a regular basis.

Dashboard configurations can be shared. This is really nice because you can save time by fine-tuning an existing dashboard instead of starting from scratch. It also can save you time if you have dashboards you like on one account, you can go to Share > Share template link, then simply access the link to add to other Google Analytics properties.

Here are my favorite dashboards:

Bonus: Use a Segment to Filter Out Spam Referral Traffic

Sometimes you’ll see spam referrals and fake data in your Google Analytics account. Most often, you’ll notice this when looking at your referral traffic. You’ll see a site as a referral but when you go to the site they don’t actually link to your site anywhere. This is ghost referral spam is an unfortunate issue in Google Analytics that Google hasn’t resolved yet.

Fortunately, there is now a pretty good way to easily clean this up. You can download a custom spam filter segment created by Loganix for free. Filtering traffic with a segment is great because it only temporarily modifies the data. This custom segment catches about 97% of the spam and Loganix keeps it regularly updated. Using this segment helps clean up your data and improves your insight.