Skip to content
    UW Crest
    CALS WordPress Hosting

    University of Wisconsin Madison

    • Support Docs
      • Requesting a Site
      • Planning Your Site
      • Changelog
      • 2015 Theme Docs
    • Contact Us
      • Web Support
      • New Website Request
    • Login
    • CALS Main
    UNIVERSITY of WISCONSIN-MADISON UW-MADISON
    • Login
    • CALS Main

    Dark Mode On

    Your device is set to dark mode so this site is matching that preference. You can click the moon icon to change your site experience.

    • Getting Started
      • Requesting a Site
      • Planning Your Site
      • Setting up Your Site
      • Adding Content to Your Site
      • Web Hosting Guidelines
    • Tutorials
      • Basic Tutorials
        • Theme Customization Options
        • Logging In
        • Adding/Removing Users
        • Editing Your Site Menu
        • Google Analytics
        • Jump Links
        • Creating Accessible Content
      • Advanced Tutorials
        • Improving Site SEO
        • Using Animation
        • E-Commerce & Shopping Cart Options
        • Embed a Google Calendar
    • Blocks
      • CALS Blocks
        • Accordion
        • Tabs
        • Card
        • Carousel
        • Modal
        • Posts
        • UW Today Events
      • Core WordPress Blocks
    • Plugins
      • Plugin Guidelines
      • Resource Directory
      • CALS People Directory
      • Protect Pages With NetID
      • Redirection Plugin
      • Broken Link Checker
    • 2015 Theme Docs
    Basic Tutorials

    Google Analytics

    This document will walk you through the process for adding a Google Analytics 4 (GA4) measurement ID to a CALS hosted WordPress website.

      Important Note

      While the CALSv4 theme does allow you to add your Google Analytics ID and configure your site to track views, Google Analytics is not officially supported by CALS Web Services. If you have any issues getting it set up or have questions, you’ll need to defer to Google’s documentation and support.

      We strongly recommend that you use a departmental service account when using non-core apps to share ownership of and avoid losing access to data owned by a former employee or student. Google Analytics data cannot be recovered from accounts belonging to individuals who have left the university. If you don’t have or want to setup a UW service account, then we suggest adding multiple site owners via their UW NetID, rather than a personal Gmail account.

      This tutorial assumes that you are using the UW-branded CALS theme.

      Set up a Google Analytics 4 property

      Your first step in this process is to set up Google Analytics 4 property to begin collecting data. To start, log in to your correct account at https://google.com/analytics/, and choose the correct existing property that you want to update. Once you have access to it, click the gear icon for Admin actions in the lower left portion of the screen.

      1. In the Property column, click the GA4 Setup Assistant option.
      2. In the next screen, click Get Started under the option for “I want to create a new Google Analytics 4 property”
      3. In the next screen, click Create property
      4. Click Go to your GA4 property. This will open a new window.
      5. In the new window, click Data Streams in the left column
      6. Click the account that you just created to access the necessary ID value
      7. On the right, click on the copy icon for the Measurement ID. This is the value you will need to update in your WordPress site.

      Add GA4 Measurement ID to your CALS WordPress site

      The following instructions are for those that use one of our two supported CALS WordPress themes. Once you have your Google Analytics Measurement ID, return to your WordPress site and log into the admin dashboard area.

      1. Hover your mouse over Appearance and click the Customize option
      2. Click Analytics
      3. In the Google Analytics field, paste in the GA4 Measurement ID value for your Google Analytics 4 property.
      4. To activate this, click the Publish button at the top.

      Please note: Once you publish this change to your site, it can take up to 24 hours for data to begin showing up in your Google Analytics dashboard.

      Frequently Asked Questions

      |

      TLDR: Technically, there are a couple of ways to accomplish this in Google Analytics, but neither work very well as they are a bit cumbersome to setup and are often unreliable.

      As an alternative approach, when you’re editing a page, use the Preview in New Tab option in the editor to preview your changes. This provides a full preview of the page without incurring or logging analytics because WordPress creates a temporary preview_nonce url to view the page.

      At the core if it, most folks don’t filter out their own analytics because in the grand scheme, it really doesn’t inflate the analytics enough to matter. The main reason is that it is often unreliable to filter just your own IP in Google Analytics (GA4), and depending on the method that is chosen, can lead to data loss. So for most, the cons outweigh the benefits of doing it.

      Cons – Why it rarely works well

      • Most home and mobile internet connections (including UW Wireless and Eduroam) use DHCP to dynamically assign the IP address for a device, because DHCP is dynamically assigned in regular intervals, this results in the public IP address changing regularly. For the Google Analytic filter methods to work properly, the filter is tied to your IP address, so the filter will stop working or block the wrong traffic as soon as your device’s IP address changes. This would result in you needing to go in to update the Google Analytics filter settings every time before you access your website.
      • GA4’s “Exclude internal traffic” filters are permanent once activated. If the filter is misconfigured (common with changing IPs), you run the risk of permanently losing valid data.
      • It can take time to apply, which makes spot-testing frustrating.
      • Web development teams do sometimes use this when the internal team shares stable static IP addresses or range of IP addresses for or a company. If your office has a static IP address then that could work, but again, a solo user’s “hits” usually don’t make enough of a difference to warrant the extra hassle.

      If you would like to try it:

      Here are a couple of options below. Please make sure you understand the tradeoffs before opting for either method.

      1. Create a report to use report filters in GA4 to temporarily hide your own sessions while reviewing data: https://support.google.com/analytics/answer/11377859 
      2. This is the actual filtering out method (not recommended): https://support.google.com/analytics/answer/10104470 

      Need help with your website?

      CALS Web Services is here to ensure you have all the tools you need and understand how to use them. If you ever get stuck, please don’t hesitate to reach out. We’re here to help!

      Contact Us

      All Support Docs
      AnalyticsWordPress
      CALS logo
      Privacy Notice  | © 2025 Board of Regents of the University of Wisconsin System
      Feedback, questions or accessibility issues: websupport@cals.wisc.edu
      Login Request Help Help Docs