Skip over navigation

These documentation pages may contain screenshots and instructions for an older version of Roxen CMS; however, most of the information should still be relevant. The Roxen CMS servers will be shut down September 2019.

Google Analytics

You can add Google Analytics to your site for free. Follow the steps below. If you run into any snags, e-mail for assistance. We're happy to help.

The departmental Roxen servers (deptaedit and deptbedit) use the Universal Analytics tracking code (analytics.js). Sites that were using the old “ga.js” tracking code do not need to change anything. The same UA number, used in the “stat-id-string” variable, works with the newer code.

If you want to learn more about Google Analytics, visit the University's training website (login required) and search for "Google Analytics Essential Training."

Step 1: Choose a Google Account

You can register your website with Google Analytics using your University netID and password if you wish, or you can choose another Google account.

If you already have a personal Google account, and if you would like to use it, you are welcome to do so.

If you would like to create a new account for only this purpose, you can do so for free at

Step 2: Get a Google Analytics Number (UA number)

Once you have the Google account that you would like to use, register for the free Google Analytics service at

Follow the instructions

If you are a new user to Google Analytics, you should follow their instructions titled "Get Started with Google Analytics".

Get Your Number

Your UA number will appear something like "UA-12345678-9." Copy this number.

Step 3: Add the UA Number to Your Site

Log in to the edit server for your site and enter the Content Editor (the file and folder view). Look for the variables.xsl file. The XSL template files should be listed near the bottom. If you do not have this file, please e-mail us at

Edit contents, and add the following code:

<xsl:variable name="stat-id-string" select="'UA-12345678-9'" />

Change "UA-12345678-9" to your UA number. Keep the single quotes inside of the double quotes.

"</xsl:stylesheet>" needs to be the last line of code on that page, so place the stat-id-string variable above this final line.

Commit "variables.xsl," and wait for front end replication (up to 10 minutes). Confirm within your analytics account that Google Analytics is receiving data for your site.

If you would like our help with this step, we would be happy to assist you. Simply e-mail with your UA number and sitename, and we will add it for you.)

Important Note

Only the front end servers will be used to gather statistics for your site. Statistics are not taken from the edit servers. Thus, if you would like to see the JavaScript inserted into your site for Analytics purposes, you will need to look on your live site.