How to Set Up Google Analytics on Your Website
Whether you run a blog or an enterprise-class website, there are common things you need to know about your website. For example, you need to know where your visitors come from, how long they stay on your website, and what content they like the most.
Google Analytics can provide answers to these questions, and it’s free for anyone to use for personal or business purposes. The following article will help you set up Google Analytics in a few simple steps.
Log In or Sign Up for a Google Account
With some Google services such as Webmaster Tools, YouTube, or Feedburner, you need to consider whether you’ll need to give others, like your colleagues or contractors, access to your Google services. The answer to this question will help you decide whether to set up your Google services under your own personal account, or to create a new Google Account strictly for business.
You can allow other Google Account members to access your Google Analytics data without having to provide them access to your main Google Account.
Setting Up Google Analytics
Once you’ve logged in to your Google Account, visit the Google Analytics website, and click on the “Access Analytics” button. If it’s your first time accessing the Google Analytics page, you’ll probably have to re-enter your Google Account password to begin. Click on the “Sign Up” button to create a new account for your website. Enter the “Account Name” (generally, go with domain.com as it makes it easy to see which account is for which website), your website’s URL, and the time zone you are located in.
Google will ask if you want to share your analytics data with other Google products, or third party services. Typically, you will want to share your data with other Google products like AdWords, AdSense, Webmaster Tools, and so on. Google also gives you the option not to share your analytics data at all.
Tracking Code Configuration
Once you’ve created your Google Analytics account, the next step is to set up the Tracking Code Configuration. Here, you will tell Google Analytics whether you are tracking a single domain (domain.com), a single domain with multiple subdomains (domain.com, blog.domain.com, store.domain.com), or multiple top-level domains (domain.com, domain.uk, domain.fr).
If you are using Google AdWords, you can check the “AdWords Campaigns” box to link your AdWords account to Google Analytics. This will enable advanced tracking of your Adwords campaigns.
If you need additional options, click on the “Advanced Setup” tab. This will allow you to track sites built for mobile phones, and to track ad campaigns from providers other than Google AdWords. There is also a “Custom Setup” tab for more advanced Google Analytics functions. Custom set up code can be found in the Asynchronous Tracking Usage Guide. If you are just starting out, we’d suggest sticking with the Standard configuration until your analytics data needs change.
Tracking Code Installation
Once your tracking code is configured, you will need to install it onto your website. The installation procedure varies, depending on how your website is built. For example, if you run a website in WordPress, some themes come with admin panels that allow you to copy the Google Analytics tracking code into fields specifically designed for tracking scripts.
For themes without an admin panel option, you will have to find the part of your site’s template before the closing </head> tag in the actual HTML code — which is typically the “header.php” file. If your website is simply a collection of HTML pages, you will need to install your tracking code before the </head> tag of each page you want included in your Google Analytics data.