WiscWeb - Adding Google Services to your UW Theme WordPress site

WiscWeb sites are built using the UW Theme, UW-Madison's official WordPress theme. This guide explains how to connect your UW Theme site with Google Analytics 4, Google Tag Manager, and Google Search Console.

In this document

Before you begin

Use of departmental service accounts

While service accounts can be used for non-core apps, consider that these have a 0GB quota in My Drive.

Technical support and resources



Where to add Google Services in the UW Theme

Throughout this guide, follow these steps to connect your WordPress site to Google Analytics 4, Google Tag Manager, and Google Search Console.

  1. Open your WordPress site dashboard and go to the Appearance, and then Customize.
  2. Find and select Google Services.
  3. You will add various Google IDs into these input fields to connect your accounts:
    1. UW Theme Google Services input fields

Add Google Analytics without Google Tag Manager (simple)

  1. To get started, use Google's instructions to create and set up a new Google Analytics 4 account, property, and web data stream.
  2. After creating your account and Google Analytics 4 property, you will use our installation instructions in the next step rather than Google’s directions.
  3. Copy the Google tag ID associated with your Google Analytics 4 account.
    1. Visit Google’s documentation to learn how to find your Google tag ID.
    2. A Google tag ID is a series of letters and numbers that usually starts with “G-”.
  4. In a new tab, navigate to Google Services from your site’s WordPress dashboard by clicking on Appearance, Customize, and then Google Services.
  5. Paste your Google tag ID into the Google Analytics Tracking ID field and click publish to save the change.
  6. Access your Realtime report dashboard to verify that traffic to your website is being detected.
  7. It can take up to 24 hours for Google Analytics to process and display visitor data in your Analytics dashboard.
  8. If you still aren’t seeing data within 24 hours, visit Google’s troubleshoot document for tips and additional resources.

Add Google Analytics using Google Tag Manager (advanced)

These instructions are for users who want to manage their Google Analytics 4 account within Google Tag Manager. This is considered a more advanced setup, and is only recommended for more advanced analytics professionals.

Before you begin you must…

  1. Create a Google Analytics 4 account, property, and web data stream
  2. Create a new Tag Manager account and container

Connect Google Tag Manager to your site

Once your Tag Manager account has been setup and published live, you will copy the container ID for your account and add it to your WordPress site:

  1. In Tag Manager, click Workspace
  2. Near the top of the window, find and copy your container ID, formatted as “GTM-XXXXX”.
  3. In a new tab, navigate to Google Services from your site’s WordPress dashboard by clicking on Appearance, Customize, and then Google Services.
  4. Paste the container ID into the Google Tag Manager Tracking ID
  5. Now that you installed Tag Manager on your website, follow Google’s instructions to configure Google Analytics 4 in Tag Manager.
  6. After adding your Google Analytics 4 tag, verify that your tags work and publish your changes.
    1. Tag Manager’s Preview feature will not work if you are logged into your WordPress site, so we recommend using an Incognito browser window for testing.
  7.  If there are any errors, start debugging with the Tag Assistant.

Add and verify Google Search Console

  1. Open Google Search Console, you may be prompted to sign in and authenticate with DUO using your NetID and password.
  2. Follow instructions to add a new Property (a generic term for a website that you have added to your Search Console account).
  3. Add your website URL in the Select URL prefix option and click Continue.
  4. Once your property is added, you will be asked to verify site ownership
    1. Click on the HTML tag dropdown
    2. Only copy the long string of letters and numbers in between the content= quotations.
    3. In a new tab, navigate to Google Services from your site’s WordPress dashboard by clicking on Appearance, Customize, and then Google Services.
    4. Paste your verification string into the Google Search Console Verification field and Publish the change.
    5. Navigate back to Google Search Console and click Verify
    6. Allow the tool a few moments to verify that the site has been verified successfully.
    7. Google will only add results for a page that has already been indexed by their search engine.
      1. If you are not seeing a page show up in your results, please consult Google’s documentation on how to Ask Google to recrawl your URLs.
      2. Recrawling a site or page may take anywhere from a day to a few weeks, and is based on Google’s schedule.
      3. Google has a quota for the amount that can be processed, so we recommend only submitting a request for pages that absolutely need to be re-indexed.
      4. Submitting multiple re-indexing requests for the same URL will not result in Google processing it any fast.
    8. Visit Google’s Get Started with Search Console for further help and guidance.



KeywordsSearch, statistics, google, gtm, analyze, data, cms, analytics, tracking, traffic, home page, metrics, theme, UW Theme, tag manager, tag, manager, search console, search, console, add, ga4, customizer, trigger, tags, crawl, search results, connect, events   Doc ID69291
OwnerMatt G.GroupWiscWeb
Created2016-12-08 14:14:59Updated2024-07-30 11:34:57
SitesDoIT Help Desk, WiscWeb
Feedback  0   0