Set up your Google Analytics Account
Set up GA for your Dreamweaver Site
Below are the step by step instructions for creating a Google Account for your website. Google Analytics (GA) requires code to be saved in the header of every webpage on your site.
Setting up GA for your website is a 3-step process, first an account must be created, the account is then used to generate the statisitcal tracking code for your site, and finally you will need to add the HKS primary account to the code.
Step 1 - Create the account
- Google will ask for an E-mail and a password. IT Services wil provide users with an account they can use to submit to GA. Please Request an E-mail account if you have not done so already, a standardized E-mail is necessary to maintain some consistency with our accounts.
- Sign up for a Google Analytics account by clicking the "Sign Up Now" link on the page below:
http://www.google.com/analytics/sign_up.html
- After signing up for a GA account, you will receive an E-mail from Google. The E-mail will have a link that, when clicked, will confirm your account.
- Once you confirm the email address return to the GA homepage and sign in. Your account name will be the E-mail address you used to create the Google account.
- E-MAIL THE ACCOUNT USERNAME AND LOGIN TO THE IT SERVICES WEBMASTER, YOUR DIRECT REPORT, OR ANY MANAGERS IN YOUR DEPARTMENT FOR SAFE-KEEPING.
Step 2 - Generate the GA Code From Google
Once you have an account with Google you are ready to get your code.
- Log on to Google Analytics
if you are not already logged in.
- Click the "Sign Up" button.
- Enter the following information:
- your website's address,
- a name for the account (please use the default name, which will be the website address), and
- select the Eastern Time Zone.

- Enter in Contact information for your account.
- Please enter "hks" as the Last Name, and
- the name of your department as the firstname.
- The phone number should be 617.495.1984

- Agree to the terms of service and click "Create New Account"
- The "Tracking Instructions" page will appear.
Click the "New Tracking Code (ga.js)" tab to get the appropriate code for your site. (an image of the New Tracking Code tab is below)

- Copy this code and paste it on to either a blank HTML page or textpad, (do not use MS Word) and save it on your computer as backup.

Step 3 - Install the Google Code on you Dreamweaver site
The steps above will give you the statistics you need for your site, but they will not allow HKS to capture your stats along with all other HKS sites.
To do this, one final step is required - pasting the block of code below on to your text pad (along with your site's Google code). When both your Google code and the HKS Google code are together they can be pasted on to your website.
- Copy the code below and paste it at the bottom of your site's Google Code (step 7 above).:
// Harvard Google Analytics Code
var harvardTracker = _gat._getTracker("UA-3579735-1");
harvardTracker._initData();
harvardTracker._trackPageview();
- The entire code block should look like the code below when you are done. The top half of the code is your Google code, the second half is HKS Google code.
IMPORTANT NOTE: The HKS code must be pasted above </script> tag. The script tags have been bolded in the example below.
Do not cut and paste the code below, it is generic and will not return results for your site, the code below is only an example.
---------------------------------------------------------------------------------
<script type="text/javascript">
// Your Deparmtent's Code
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXXXXX-1");
pageTracker._initData();
pageTracker._trackPageview();
// HKS Google Analytics Code
var harvardTracker = _gat._getTracker("UA-3579735-1");
harvardTracker._initData();
harvardTracker._trackPageview();
</script>
---------------------------------------------------------------------------------
- Copy this code into the HTML of your site, just below the opening <body> tag of every page. If you are using Dreamweaver template you need to paste this only into the template and save it, the templates will do the rest of the work.
Websites that do not use templates will have to have the code block pasted on to every page.
Step 4 - Confirm Tracking Code is Working
A quick test through Google will confirm that your installation is successful.
Step 5 - Viewing Reports
Log in to Google with your account, your account is the E-Mail you used to set up the GA account in Step 1.2 above. Once you have logged in:
- Click the "My Account" link on the top right hand side of the Google homepage
- Click "Analytics," its a link under the "My Products" section.
- You will see a list of websites that your account is associated with. click the "View Reports" link to view a website's statistics.
Help for Google Analytics
Beginning Analytics: Interpreting and Acting on your data (youtube video - 9:07). This video will focus on some of the comercial applications of GA (like using AdWords and E-commerce), but is helpful nonetheless.
Using the Google Analtytics Interface: Customize your GA interface (youtube video - 8:11). Learn how to put the reports you review on the home page of your Google Analytics.
Generate Reports from GA - Schedule E-mails that deliver GA reports to your site.
