Skip to content

Setting up GA for multiple subdomains

I have a few sites hosted different sub domain names, recently decided to start using Google Analytics. Here are the steps:

  1. Create a profile for the master site (ie The funny thing is if the site is setup so that redirects to, then it is counted as a redirect.. Oh well
  2. In the screen where GA shows the code to copy, pick multiple sub domains on the left
  3. Paste code to all the sites
  4. In the main profile, add Filter, Custom, Advanced, Field A->Extract A Hostname enter (.*), Field B->Extract B Request URI enter (.*), Output ->Constructor Request URI, enter $A1$B1
  5. A required, B not required, Override output, Not case sensitve
  6. Now on the master profile , create a sub profile for each sub site.
  7. For each of the sub site profiles, add a Filter, Custom, Include, Field Type Hostname, enter subdomain\.domain\.com, not case sensitive

Now wait a day, and GA should start reporting

Posted in Technology. Tagged with .