About Google Analytics
Google Analytics is the recommended tool to track user interaction and collect basic data from your website.
A Princeton Site Builder site can be tracked by Google Analytics. If you want to learn more about Google Analytics, visit the University's LinkedIn Learning training website (login required) and search for "Google Analytics Essential Training." You can also follow Google's instructions, titled "Set up Analytics for a website and/or app."
Important note about Google Analytics 4
Google's latest version of its analytics product is often referred to as "Google Analytics 4." The previous version, known as "Universal Analytics," was completely retired on July 1, 2024. If you are still using a Universal Analytics number on your site (begins with UA-), you should switch to an updated tracking number (begins with G-) as soon as possible.
Google removed all Universal Analytics account data from their system. If your UA number was paired with a GA4 number, you still should have that data in your GA4 account.
How to add Google Analytics to your site
Choose a Google account to log into Analytics
You will need a Google account to use Google Analytics. You may associate multiple accounts with the administration of a Google Analytics property. Your options for obtaining an account are:
- Recommended: Use a Service Account. Signup for a new service account or use an existing one. Make sure the account is enabled for Google Apps. Move on to Step 2. The advantage of using a service account is that the account is not decommissioned when an individual leaves the University.
- If you already have a Princeton University Google account, and you would like to use that account, you are welcome to do so. Make sure the account is enabled for Google Apps. Move on to Step 2.
- If you would like to create a new non-Princeton Google account for only this purpose, you can do so for free on Google's Account Creation page, then move on to Step 2 below.
Get a Google Analytics tracking or measurement ID
Instructions for Google Analytics 4
First, follow Google's instructions on setting up Analytics for a website to create a property and obtain your Measurement ID. You will need this measurement ID for the next step.
Once you set up your GA4 property, the Stream ID is prominently displayed, but this number will not work as a tracking number. Instead, you will need to click on Data Streams on the property admin page. If you had converted a Universal Analytics property, there should already be a stream listed under "All" or "Web." In the pop-up dialog, you will need to copy the Measurement ID, as seen in the example screenshot below.

For a brand new property, click the "Web" button under "Choose a Platform," then enter in the site's URL and name to set up your new Data Stream.

Add the tracking/measurement ID to your site
- From the Admin menu, select Configuration » Systems » Basic Site Settings
- Paste/Enter your Google Analytics Measurement ID (Google Analytics 4 begins with "G-"). You can ignore the Universal Analytics Tracking ID field. This field will be removed in a future release of Site Builder.

- Click Save Configuration
- After the number has been added and Google has indexed the website, you can log in to your Google Analytics account to start seeing the statistics for your website.
Analytics reporting
Once Google Analytics and your Princeton Site Builder website are linked properly, learn to create dashboards and reporting mechanisms in Google Analytics by reading through Google's documentation and getting started guide.
Some of the most common metric reporting is done on Page Views and Site Visits.
If you wish to learn more about Google Analytics, how to run different reports, and what the reports tell you, you can find classes on LinkedIn Learning. Refer to Google Analytics 4 Essential Training.
How to Recover a Google Analytics Account
Please Note: WDS does NOT keep track of your user name and password to access your Google Analytics account. It is your responsibility to manage this information. If you have staff turnover, please be sure to transfer this knowledge accordingly.
External Resources
Related Information
ServiceNow Knowledge Article
-
Google Analytics
Google Analytics is a platform that collects data from your websites and apps to create reports that provide insights.