1.3. How to install Google Analytic code for Google site?

Before I start let me make one thing clear: you do not add the tracking code given Google Analytic, just the Tracking IDas Google Sites removes any <script></script> tags.
  1. Go to Google Analytic and sign up for an account (if you have not already done so) and sign in.

  2. Once signed in use the Add Website Profile Link at the bottom left of the page.

  3. Ensure that the Add a Profile for a new domain is chosen and now you have to enter the URL (web address) of the Google site, but be careful:

    • If you have made a Web Address mapping for your site, e.g. www.example.com, then enter that address - see Mapped Example screen shot (on the right).

    • If you have not mapped the Google Site to a web address enter:

      (where example is your site's name) your full site's address - see Sites Example screen shot (on the right).

    • Now use the Finish button

  4. Once you've used the Finish button Google Analytics displays the Tracking code: you need to get the Tracking ID from this code on line 6 - example follows with the tracking code highlighted:

  5. Now use the More Actions button then chooseManage Site and go to the General tab, tick the Statistics tick box and enter the Tracking ID (not your Google Analytics Account ID) in the Paste your Analytics Web Property ID here: text box.

After 24 hours you should start to receive data, but Google Analytics may display for a couple of days, but it will be working regardless of this warning.

Tracking Not Installed
Check Status

Screen Shots

Mapped Example

Click for larger image

Sites Example

Click for larger image

<script type="text/javascript">
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 type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXXXXX-XX");

Manage Site - General - Enter Analytics Tracking ID

Google Sites - Manage Site - General - Enter Google Analytics Tracking ID
Click for larger image