... because from time to time I'm a web developer, too
About me
Projects
Contact
Links

Sub domains in Google Analytics

December 10, 2009 | tools
author: Karol Zielinski | comments: 3 | views: 8136
Tags: , , , ,

I will try to describe how to track sub domains via Google Analytics, based on domain tspot.pl and sub domain en.tspot.pl.

Sub domains in Google Analytics

image source: z.hubpages.com

 

So…

I have a website, which is multi-languages: there is a Polish version (under tspot.pl) and an English version (under en.tspot.pl).

I’d like to track three things via Google Analytics:

  • just one domain: tspot.pl
  • just one domain: en.tspot.pl
  • both domains

It’s easier than I though at the beginning.

So let’s do it.

Create primary profile (profile for the primary domain)

Add website profile - Sub domains in Google Analytics

Click on ‘Add Website Profile’ and fill the form. In my example it’s:

  • checked ‘Add a Profile for a new domain’
  • tspot.pl under ‘Please provide the URL of the site you would like to track.’

After creating the profile, Google Analytics will display the tracking code for the site. Before you add it to your pages it must be “modified”.

Not really modified… you just shouldn’t use tracking code for a single domain (default). That’s why you should check “One domain with multiple subdomains” and copy/paste that code.

Tracking code - Sub domains in Google Analytics

Create profiles for all of your sub domains

Once you have created the master profile you can start creating profiles for each of the sub domains. Remember, each sub domain profile is based on the master profile, that we created earlier.

Add new profile - Sub domains in Google Analytics

Go to ‘Analytics settings’ (there should be list of profiles from the account) and click on ‘Add new profile’ next to the profile of your primary domain. Check ‘Add a Profile for an existing domain’, select domain and add some profile name. I added ‘subd: en.tspot.pl’ as a name.

Edit profile - Sub domains in Google Analytics

Add filter - Sub domains in Google Analytics

Now… click ‘Edit’ next to your new profile, find ‘Filters Applied to Profile’ and click on ‘Add filter’ next to it.

… now create new filter for this profile …

Create new filter - Sub domains in Google Analytics

Choose ‘Add new Filter for Profile’; add filter name, choose ‘Custom filter’, check ‘Include’, ‘Hostname’ as a Filter Field and your sub domain (in my example it’s en.tspot.pl) as a Filter Pattern. Case sensitive could be ‘No’.

That’s it. GA will track only one sub domain – en.tspot.pl via this profile.

Now, I have to repeat this step for a domain ‘tspot.pl’.

Really helpful article: epikone.com

Bookmark and Share
Post Sub domains in Google Analytics to develway Post Sub domains in Google Analytics to Delicious Post Sub domains in Google Analytics to Digg Post Sub domains in Google Analytics to Facebook Post Sub domains in Google Analytics to Reddit Post Sub domains in Google Analytics to StumbleUpon

Related news and resources

Comments (3)

4Avatars v0.3.1 v0.3.1
Sub domeny w Google Analytics - develway.pl - wiadomości dla programistów, wiadomości IT, świeże linki ze świata IT
December 10, 2009, 7:23 am

[...] tech.karolzielinski.com Follow us on Twitter 1,510 śledzących RSS Feed 168 czytelników Sub domeny w Google Analytics 1 głosuj! W jaki sposób zliczać statystyki poszczególnych subdomen oraz domeny [...]

4Avatars v0.3.1 v0.3.1
Sub domains in Google Analytics | ArtykułyNet
December 10, 2009, 3:11 pm

[...] rest is here: Sub domains in Google Analytics Kontynuuj czytanie » || Napisał dnia: 10.12.09. || Tagi:Domains, karol, tech-life, [...]

4Avatars v0.3.1 v0.3.1
Sub domains in Google Analytics | domeny
April 24, 2010, 3:29 pm

[...] Sub domains in Google Analytics 168-czytelnik, follow, google, google-analytics, jaki-spos, lnych-subdomen, statystyki-poszczeg, [...]

Write a comment

Karol Zielinski :: Just a tech stuff Hello, I'm Karol Zielinski, internet evangelist, an entrepreneur, project manager and a web developer from Gdynia, Poland. I like creative design, good advertisement, social media and all kind of stuff around the web.

Most popular posts

Much more links

Karol Zielinski    |   contact me
Gdynia, Poland
RSS - Just a tech stuff - python, java blog - web development blog Karol Zielinski on twitter Karol Zielinski on LinkedIn Karol Zielinski on facebook Karol Zielinski on delicious Karol Zielinski on digg Karol Zielinski on flickr Karol Zielinski on stumbleupon Karol Zielinski on technorati