WiscWeb - WordPress UW Theme - Adding Google Analytics to Your Site
This document will walk you through the process of creating a Google Analytics account and adding it to your site.
In this document:
- Obtaining a Google Analytics ID
- Adding the Google Analytics ID to your site
- A note about Google Analytics 4
- Helpful video training
Google Analytics generates detailed statistics about a website's traffic and traffic sources. It is intended for learning more about how people use your website.
This tool helps with tracking things like:
- Page views
- Time on site
- Bounce rates (how quickly someone is coming to the page and leaving)
- User journey flows
- New users vs returning users
- User demographics
Please note that support of this tool is limited within the Google and WiscWeb teams at DoIT.
For a full list of Google Analytics’ abilities, please see Google’s documentation.
- Navigate to Google Analytics
- If you have already created an account, click Sign in.
- It is recommended that you use an Office 365 Service (departmental) account for this purpose. For more information regarding Service Accounts, please refer to Office 365 - Getting Started with Service Accounts.
- You would use that account to sign in
- Once you have gone through your sign-up process and verified your account, you'll be directed to the starting steps for your Google Analytics. Click the Sign up button. The views and screens change often, so be sure to follow the on-screen steps set up your analytics account.
- Enter in the Property details information: Name, time zone, and currency.
- Click Show advanced options below that, and click the slider for Create a Universal Analytics property.
- Enter in the URL of the site you want to apply Google Analytics to, and click on the radio button for Create a Universal Analytics property only. At this time, the WiscWeb team is able to support Universal Analytics to our best effort.
- Click Next.
- Answer the Business information section, and click Create at the bottom of that screen.
- The next page asks you to enter several pieces of information such as your site name and URL, the site category, and your time zone. You will also create an account name, and choose who this data can be shared with outside of yourself. Once you have entered this information, scroll to the bottom and click Get Tracking ID.
- You will be prompted to accept the Terms of Service Agreement from Google. Click I Accept.
- On the next page, you will be taken to the Tracking Code section of the property that you have set up. Here you are given the Tracking ID for your analytics - this is the value that you will need for your WordPress site.
- If you are using Google Analytics 4 (not recommended as WiscWeb cannot support this version of Google Analytics at this time), to find the tracking code, navigate to Google Analytics Dashboard > Admin > Data Streams and select your data stream. Then copy the Measurement ID.
- If you run into any issues, please see Google's documentation.
Once you have the ID from Google Analytics, you can follow these steps to add it to your site:
- Log into your WordPress site's dashboard
- Click on the Customize Your Site button, or mouse over the Appearance menu on the left and choose Customize.
- In the left menu, choose Analytics. In the analytics screen, input your Tracking ID in the field, and click Publish at the top of the screen.
At this time, we recommend setting up Universal Analytics rather than Google Analytics 4.
The following videos will open in the same browser tab and will auto-play:
- The Basics of Google Analytics (YouTube)
- Deeper Dive into Google Analytics (YouTube)
- What (Else) Can You Do with Google Analytics (Kaltura)