Inserting Google Analytics into a Web Page


Follow these instructions to create and add Google Analytics to your web page:

  1. Go to google.com/analytics.

  2. Sign in with your gmail account (note that this is NOT your URI email account, it must be a standard gmail account; if you do not have a gmail account you must create one before completing these steps).

  3. Once you sign in, select the "Sign Up" button to begin signing up for Google Analytics. After signing up, you should see a screen that looks as follows. Fill out the form according to the information provided in the image below. Once you have filled out the form, click "Get Tracking ID".


  4. Review the "Terms of Service Agreement" and accept them to proceed.

  5. On the resulting page you will see a Tracking ID followed by the tracking code. You will use your cPanel account in the next step to install the Google Analytics code. Copy the Tracking ID and keep this page open.



  6. Log in to your cPanel account (refer to the Accessing cPanel Tutorial if you forgot how to log in).

  7. Under the "Logs" heading, select the "Google Analytics Integration" icon.

  8. Paste your Tracking ID into the account ID box and click "Set Up Google Analytics!"



  9. Go back to the Google Analytics page where you copied the ID from and select the "Reporting" tab (towards the top of the page).

  10. It may take up to 48 hours to show your updated website statistics. However, there is a real-time feature that will show you how many vistors are on your site right now! Select the "Real-Time" link on the left navigation, then select the "Overview" link just below it. This will show you that there are 0 visitors on your site.



  11. Go back to your cPanel and select the "File Manager" icon. You will need to make a small edit to your "topic.html" page in order for the Google Analytics installation to become effective. For example, you could add some text or make some text bold. Then, save the file.

  12. Open another browser window and enter your web page URL so that you are currently viewing your topic web page, keep the page open. Now go back to your Google Analytics page.

    The active users on site should change from 0 to 1 because you are currently visting your web page. This may take a few minutes to change, be patient. You may have to go back to your web page and refresh the browser for the change to render. Take a screenshot of this page once the active users changes to 1 and follow the remaining assignment instructions.