Use Google Analytics on your site

A Google Tag ID is a unique identifier that allows Google Analytics to collect data when inserted into a website. After creating your Google Analytics account, simply copy the Measurement ID and add it to your Stanford Site.

  1. Navigate to Configuration > System > Site Settings:

  2. Add your tracking ID in the textbox labeled Google Analytics Account:

  3. Click Save.

Do you need to have analytics on your site?

We only recommend using an analytics package on your site if you plan to use the information to make adjustments to your site structure or content. 

Data-driven insights allow you to make informed decisions regarding content strategy and site architecture. You can focus on what works and abandon what doesn’t. If your group frequently creates email or social media campaigns designed to drive traffic to your site, analytics is a crucial part of understanding if your efforts have been successful.

However, analytics tools can impede the performance of your site. Collecting user data can also raise privacy issues. With increasing regulations (e.g., GDPR, CCPA), we recommend that you install analytics only if you plan to use them regularly to inform decision-making.

If your main need for analytics is to report overall site traffic back to interested parties, let us know. Stanford Web Services has platform-level tracking that we can use to provide high-level information about visitors to your site.

More about using analytics on your site

  • Stanford Sites analytics setup only tracks site visitors, not site editors. The traffic from editing your site while logged in is not sent back to Google.
  • Starting with release 5.4.0, the cookie dropped by Google Analytics has your site's URL as the cookie domain. If you are trying to do cross-site tracking, please reach out to the Stanford Sites team. We can advise on other methods for adding your analytics tracking to your site.
  • Starting with release 5.4.0, the cookie dropped by Google Analytics has a 6 month lifespan. You may see some fluctuations in your new/returning visitor reports as a result.

Related Topics

Marketing and Analytics

Stanford Sites provides support for many third-party marketing and analytics tools, including social media sharing, Google Analytics, and more.