Google Analytics is a service offered by Google that generates detailed statistics about a website’s traffic and traffic sources and measures conversions and sales. It is the most widely used website statistics service and the basic service is free.
Creating your first Google Analytics account
- Visit http://www.google.com/analytics.
- Click Create an account and follow the instructions.
Note: If you are already an AdWords user, you can create a new account within AdWords: Click Tools and Analysis > Google Analytics, and follow the instructions.
If the website you want to track is not created during the account setup the steps below outline adding a property (website or app) to your Google Analytics account, if you already have your tracking ID skip ahead to Installing the Web Tracking Code.
Add a property
- Click Admin at the top of any Analytics page.
- In the Property column, click the menu, then click Create new property.
- Select whether you want to track a website or an app:
- Select an industry category that reflects the content of your site or app.
- Select the time zone you want to use as the day boundary for your reports, regardless of where the data originates.
- Click Get Tracking ID.
Installing the Web Tracking Code
Installing the web tracking code requires access to the source code for your website, if you would like WiseInternet to install the code on your behalf contact us with your request.
If your website is powered by WordPress please visit our Install Google Analytics on Your WordPress Website article for installation options.
- First, find the tracking code snippet for your property.
- From any Analytics page, click Admin.
- Select the property you want to track.
- Check that the URL at the top matches the one for your website.
If the settings are showing the wrong web property, click the link in the breadcrumb trail for your account, and select the correct property from the list.
- Click the Tracking Info tab.You’ll see something similar to the code snippet below, where
XXXXX-Yindicates the property ID.
var _gaq = _gaq || ;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’); s.parentNode.insertBefore(ga, s);
- Turn on the tracking options you want, then click Save.
- Copy and place the code snippet
Once you find the code snippet, copy and paste it into your web page, just before the closing
</head>tag*. If your website uses templates to generate pages, enter it just before the closing
</head>tag in the file that contains the
<head>section. (Most websites re-use one file for common content, so it’s likely that you won’t have to place the code snippet on every single page of your website.)
For the best performance across all browsers we suggest you position other scripts in your site in one of these ways:
- before the tracking code snippet in the <head> section of your HTML
- after both the tracking code snippet and all page content (e.g. at the bottom of the HTML body)
- Verify and customize
Verify that your tracking code contains the correct web property ID for your view (it should if you copied it from the View Settings screen). Double-check that the tracking snippet installed on your website matches the code shown in the view. For more details on verifying your setup, see Verifying your setup.Add any customizations back in using the asynchronous syntax. The Usage Guide and Migration Examples (English only) on Google Code provide many examples of customizations with asynchronous tracking.