I recently acquired a new client. They were needing the usual website optimization and digital strategy. As usual I wondered about their data. Luckily they recently installed Google Analytics so I was really happy. Once I researched the client’s analytics I noticed they had a bunch of sub domains they forgot to tell me about. At this point I noticed they were using the new and improved “Google Universal Analytics.” A new and improved tracking code launched in March 2013. (Learn more about the benefits of Google Universal Tracking.)

I had a lot of questions regarding the code, especially now that I have subdomains to track. My immediate question was: “Is Google Universal Tracking Code customization basically the same as the old code?” Well, let me go into some of the things I found out.
Note: Some of this tutorial might be real simple for people, but I feel it’s important.

How to identify Google Universal vs Classic Analytics

Ok, first let’s identify what code the client is currently using.

Google Universal Code Identification

Google Classic Code Identification

Subdomain Tracking with Google Universal Analytics Code

Now let’s review subdomain tracking. There are several tutorials on the web that explain subdomain tracking. Many of the tutorials are outdated and have “extra” filtering associated. I had to do some, trial and error to get my subdomain tracking perfect. The way I describe below worked for me with Google Universal Analytics.

[box color=”red” icon=”config” size=”big”]

WARNING: Raven Tool GACONFIG Out of Date

You might come across a Raven Tool called GaConFig (gaconfig.com – http://gaconfig.com/one-domain-with-subdomains/). I use Raven Tools for SEO purposes to track my clients. Unfortunately this tool is out of date. Do not use it for Google Universal Tracking Tool. When Raven Tools updates their Google Tracking Tool I will update my article. (PS: If anyone notices Raven’s Tool updated let me know)

This is Raven Tools OUT OF DATE TOOL Screenshot:

[/box]

Ok so let’s get to the “tutorial” part of my little article.

The first thing you need to understand is that the Google Tracking Code needs to be the same for the main domain as the subdomain. So to reiterate what I just said; the SAME Google Tracking Code will go on “www.maindomain.com” as “subdomain.maindomain.com.”

[box color=”green” icon=”settings” size=”big”]

Where to find Google tracking Code

You find the code by clicking on > Admin > Tracking Info > Tracking Code.
Once you find the code snippet, copy and paste it into your web page, just before the closing </head> tag*. If your website uses templates to generate pages, enter it just before the closing </head> tag in the file that contains the<head> section. (Most websites re-use one file for common content, so it’s likely that you won’t have to place the code snippet on every single page of your website.)