Categories: Discuss Tracking and Implementation issues :

Analytics doesn't show third level domain name in a Worpdress Multisite installation

Showing 1-7 of 7 messages
Analytics doesn't show third level domain name in a Worpdress Multisite installation Webquadro 10/1/10 2:13 AM
Analytics show content like this:

/2010/09/30/ciao-mondo/

I am not able to distinguish between the different subdomains.

My structure is:

www. site .com
subdomain1. site .com
subdomain2. site .com
...
subdomainN. site .com

I'm using the same code on every site:

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'XXXXXXXXXX']);
  _gaq.push(['_setDomainName', '.site.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

I'm missing something?

thanks in advance
Maurizio
Re: Analytics doesn't show third level domain name in a Worpdress Multisite installation Whims 10/1/10 10:54 AM
create a duplicate profile - call it something that is relevant/meaningful to you  (always leave the first profile as a Master profile without any filters etc applied to it)

then create the following filter and apply it only to the duplicate profile:
Filter name: something of your choice
Filter type: custom
Advanced
Field A --> Extract A  Hostname  (.*)
Field B --> Extract B  Request URI  (.*)
Output To --> Constructor   Request URI  /$A1$B1
Yes
No
Yes
No

This will pull the subdomain visitor data into the one profile with the main site (otherwise subdomains show as refering sites in the Traffic Report) it will also enable you to differentiate between pages on the subdomains that might have the same page urls ie subdomain1.site.com/index.html and subdomain2.site.com/index.html

you may then go a step further if you want to and setup further duplicate profiles with filters for each individual subdomain
for each subdomain, create a duplicate profile and a filter for that subdomain with the following filter pattern:

Filter name: something of your choice
Filter type: custom
Include
Filter Field Hostname
Filter Patter subdomainname\.domainname\.com
No

Cheers
Whims :-)



Re: Analytics doesn't show third level domain name in a Worpdress Multisite installation Whims 10/1/10 11:01 AM
just as an afterthought.. in that 2nd filter example, where the Filter Pattern is subdomainname\.domainname\.com
for each filter you create for each subdomain profile, you enter the name of your own subdomain and domain
Re: Analytics doesn't show third level domain name in a Worpdress Multisite installation Webquadro 10/4/10 2:22 PM
Thanks for the support Whims.

I waited two days before responding to make sure the data received. Entering the first two filters everything started to work for the first subdomain.
As soon as I added 22 more filters to all of the subdomains tof my network, the visits have gone to 0.

Main Account visits continue to be collected.

All filters included are the same (except for subdomain):

Filter name: something of your choice
Filter type: custom
Include
Filter Field Hostname
Filter Patter XXXX\.YYYY\.com
No

Alternatively If i put two scripts on the head (one for the network and one for the subdomain) it should be easier for me but i'm not sure if it's possible
Re: Analytics doesn't show third level domain name in a Worpdress Multisite installation Whims 10/4/10 3:20 PM
are you using a blogging platform or cms?

Ok.. im not really sure what you have done.. however ... you have the master profile that you originally setup and keep it with NO filters applied to it
this logs all the main site traffic and will show the traffic from the subdomains as referring traffic.

Check the profile settings in the master profile that the website URl is http://www.yourdomain.com
and the default page is set to index.html or index.php or whatever your main site uses as its default start/home page
(each time you create a profile you will need to manually enter the default page info into the profile via the profile settings page for the profile)

You then setup a duplicate profile of the Master profile and apply this filter (this is the only filter that gets applied to this profile):
Filter name: something of your choice
Filter type: custom
Advanced
Field A --> Extract A  Hostname  (.*)
Field B --> Extract B  Request URI  (.*)
Output To --> Constructor   Request URI  /$A1$B1
Yes
No
Yes
No

**you need to ensure that the website url and default start page are entered the same as in the Master profile

You then setup further seperate duplicate profiles for each subdomain that you need to track with the following filter applied to each profile (this is the only filter that gets applied to a single profile)
Filter name: something of your choice
Filter type: custom
Include
Filter Field Hostname
Filter Patter XXXX\.YYYY\.com
No

ie new profile we'll call it subdomain1"
Filter name: something of your choice
Filter type: custom
Include
Filter Field Hostname
Filter Patter subdomain1\.yourdomainname\.com
No

New profile subdomain2:
Filter name: something of your choice
Filter type: custom
Include
Filter Field Hostname
Filter Patter subdomain2\.yourdomainname\.com
No

and so on for each profile that you create for each subdomain
Re: Analytics doesn't show third level domain name in a Worpdress Multisite installation Webquadro 10/4/10 3:35 PM
OK OK OK!!! Now i understand! I'm newbie in filter so forgive me ;)

I created ALL the filter in the same profile (the second)...

Now it's clear.

1 - Master profile
2 - Secondary profile with advanced filter
3 - An account for each subdomain with the second filter associated

I will never stop thanking you
Maurizio
Re: Analytics doesn't show third level domain name in a Worpdress Multisite installation Whims 10/4/10 4:02 PM
You're welcome :-)

I think i need to get new eye glasses  lolol
my last post started with: are you using a blogging platform or cms?
meanwhile your post title clearly states you are using wordpress 

lololol