Connect to Google tools

Last updated:

UW Theme 2.0 has options for connecting your site to Google Analytics, Google Tag Manager, Google Search Console, and Google Programmable Search Engine to track traffic and improve search results. This page provides guidance on how to set them up in the theme.


Before you begin

Before you connect Google tools, review these important considerations to ensure your setup is supported, secure, and compliant with campus policies.

|

Do not connect Google Analytics, Search Console, or Tag Manager until your site is live on its final public URL (for example, buckybadger.wisc.edu). Setting them up too early can create confusing data and extra setup changes later.

UW Theme 2.0 provides fields to connect your site to Google tools, but the UW Theme Team and WiscWeb cannot offer support for using these tools. For more help, visit Google documentation.

Create or configure an ad-free Programmable Search Engine before adding it to your site. Otherwise, ads may appear in your site search results.

Some campus groups are part of UW–Madison’s Health Care Component (HCC) because they handle protected health information (PHI) under HIPAA. If your site is part of the HCC, do not add Google tools to your site without approval from your unit HIPAA Privacy or Security Coordinator.

Step 1: Account creation

Use a UW service account

Use a departmental service account for Google tools whenever possible for security and for maintaining shared access with your team members. This protects your team from access issues during staff turnover or when student employees leave. Learn how to create a service account.

Create an ad-free Google Programmable Search account

Create or configure an ad-free Programmable Search Engine before adding it to your site. Otherwise, ads may appear in your site search results.

Step 2: Add Google IDs to UW Theme

Add Google Analytics Tracking ID

Add Google Analytics by using the following steps:

  1. Log into Google Analytics.
  2. Create an Analytics account if you do not have one.
  3. Find and copy your Google Analytics tag ID. Google tag IDs start with “G-“

  4. Paste the Google tag ID in the Google Analytics Tracking ID field in Theme Settings under the Google tab.

    Google Analytics tracking ID field
  5. Logged-in users won’t appear in the report. Log out or ask someone else to visit the site to test.
  6. Check the Realtime report in GA to confirm traffic.
  7. No data after 24 hours? Visit Google’s troubleshooting guide.

Learn more about Google Analytics.


Add Google Tag Manager Tracking ID

Google Tag Manager (GTM) allows you to centrally manage all marketing and analytics tags, like Google Analytics, Facebook Meta Pixel, and Google Ads, in one place.

Add Google Tag Manager by using the following steps:

  1. Log into Google Tag Manager
  2. Create a Tag Manager account if you do not have one one and choose “Web” as the target platform.
  3. Find and copy your container ID located in the Workspace tab. Google Tag Manager container IDs start with “GTM-“.

    Google Tag Manager ID example starting with “GTM-”.
  4. Paste the container ID into the Google Tag Manager tracking ID field in Theme Settings under the Google tab.

    GTM ID field
  5. You can now add desired tags to track data and clicks on your pages.
  6. Preview to test the connection. GTM scripts aren’t added for logged-in WordPress users, so log out if your tag data isn’t showing
  7. Publish your GTM container when ready to track live data.

To set up Google Analytics with GTM, follow Google’s documentation.

Learn more about Google Tag Manager.


Add Google Search Console ID

Google Search Console helps you monitor, maintain, and troubleshoot your site’s presence in Google Search results. You can also submit a sitemap to Search Console to help Google discover and crawl your site.

Add Google Search Console by using the following steps:

  1. Log into Google Search Console.
  2. Follow Google’s instructions to add a new URL-prefix property. Do not select the Domain property.
  3. Choose the HTML tag verification method from the pop-up to verify site ownership.
  4. Google will give you a line of code.
  5. Copy the long string of letters and numbers inside the quotations marks after “content=“. The ID is a long string of numbers and letters that is 43 characters long.

    Google Search Console id located between "=content"
  6. Paste that string into the Google Search Console verification tag field in Theme Settings in the Google tab.

    Google Search Console verification tag field
  7. If your site is hosted on WiscWeb, it may take up to 5 minutes for the cache to clear. If you see errors, wait a few minutes and try again.

Submit a sitemap (optional)

After verifying your site in Google Search Console, you can submit a sitemap. WordPress automatically generates a sitemap for your site.

Your sitemap URL is: https://your-site.edu/wp-sitemap.xml

To submit your sitemap:

  1. Open Google Search Console and select your site.
  2. Go to Sitemaps.
  3. Enter the sitemap URL and submit.

After you submit the sitemap, Google will begin processing it. Indexing and updates may take time to appear.

Search Console resources


Additional resources

For detailed instructions and troubleshooting, use Google’s official documentation and training materials. These resources offer the most up-to-date guidance for using and managing each tool.

Get more help

WiscWeb sites

If your UW Theme 2.0 site is hosted in the WiscWeb WordPress Service, contact their support team for help.

Non-WiscWeb sites

If you manage or develop a custom
UW Theme 2.0 site outside of WiscWeb, email the UW Theme team.

Weekly Office Hours

Get one-on-one help with design, accessibility, and WordPress in weekly office hours.

Not sure who to contact? Email the UW Theme Team or find additional resources.