Tracking Usage with Google Analytics

Last updated: March 23, 2022

This page is designed to help Shared Web Hosting users set up the current version of Google Analytics (GA 4) for their websites.

Google Analytics is a free service offered through Google that allows you to collect and analyze detail about visitors to your website pages.

In order to use Google Analytics you will need to set up an account and then connect that account to your website or to individual pages.

Getting Started

Create an Analytics account. Go to google.com/analytics. To create an account, click “Get started today”.  If you already have a Google Analytics account, click “Sign in to Analytics”.

Setting up Google Analytics for your website and/or app.

To create a GA Property:

  1. Once logged into the account, go to the Property column and click “Create a Property”.
  2. Enter a name for the Property and select a time zone.
  3. Next select an industry category and business size.
  4. Click “Create” and accept Google terms of service.

Adding a data stream:

  1. In the Property column, click “Data Streams” and then “Add Stream”.
  2. Choose the ‘Web’ data stream setup
  3. Setting up a Shared Web Hosting website as a Web Stream.
    1. Enter the website URL, for example ‘depts.washington.edu/your-sitename-here
    2. Enter a Stream name.
    3. Modify measurements (optional)
    4. Click “Create Stream”
    5. Analytics will respond back with a ‘Global Site Tag’ (G- id number) which will need to be added to your web pages.
  4. Setting up the global site tag correctly will depend on the type of website you are hosting.
    1. Open the new Web Stream details and look for the section called “Tagging instructions”.
    2. Click “Add new on-page tag”.
    3. Select “Global Site Tag (gtag.js)”
    4. Follow the instructions to copy and paste the global site tag code snippet.
    5. For use on a CMS, such as Drupal or WordPress, see: https://support.google.com/analytics/answer/10840722?hl=en&utm_id=ad#cms

From: https://support.google.com/analytics/answer/9304153

 

Additional Information

Training: https://analytics.google.com/analytics/academy/

Google Analytics for developers: https://developers.google.com/analytics

Further help with Google Analytics: https://support.google.com/analytics#topic=9143232

 

Although support is not provided, and some of these may not work on Shared Web Hosting, here is an article on open source alternatives to Google Analytics:

https://opensource.com/article/18/1/top-5-open-source-analytics-tools