Categories: Discuss Tracking and Implementation issues :

Sub domain tracking Issues - PLEASE HELP!!

Showing 1-9 of 9 messages
Sub domain tracking Issues - PLEASE HELP!! GA_Newbie21 8/15/11 9:13 AM
Hi

Having serious issues with sub domain tracking in Google analytics, have been reading and testing over the past 2 weeks and still no nearer the solution I crave.

The scenerio/issue is as follows

Have one main www. domain with multiple sub domains which I wish to track separately. The sub domains must be treated as separate domains within the report and MUST be seen as referrals. BUT do not want to see self referral per profile for each domain so for example within the www. profile would not want to see www. as the top referring site but would want to see sub.domain1 as a referral.

For our current tracking set up we have GA tracking per domain and sub domains. So each has it's own profile with its own tracking code and account number. This solution however does not work as each profile reports a high number of self referrals as well as displayng corrupted organic traffic. Example being organic keywords which only show for www. are showing within the sub.domain's reports for organic traffic.

As I wanted separate reports and clean data for my www. domain and sub domains I tested the sub domain tracking on a test site. When testing I have tried about everything, I have tried

//Tracking code customizations only
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12345-1']);
_gaq.push(['_setDomainName', '.mysite.com']);
_gaq.push(['_setAllowHash', false]);
_gaq.push(['_trackPageview']);

With and without the leading period

I have tried

//Tracking code customizations only
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12345-1']);
_gaq.push(['_setDomainName', 'mysite.com']);
_gaq.push(['_addIgnoredRef', 'mysite.com']);
_gaq.push(['_trackPageview']);

For each I have set up the following filters

Filter Type: Custom filer -> Advanced
Field A -> Extract A: Hostname -> (.*)
Field B -> Extract B: Request URI -> (.*)
Output To -> Constructor: Request URI -> $A1$B1
Field A Required: Yes
Field B Required: No
Override Output Field: Yes
Case Sensitive: No

And....

Custom filter
Include
Filter Field: Hostname
Filter Pattern: sub.domain.name (of subdomain site you want to track)
Case Sensitive: no

None of which have worked.

All I want to do is have my www. domain and sub domain tracked separately whereby the following happens:

For the www. profile only traffic generated via www. is included and any visits that come from our sub domains are treated as referrals

For sub domain profiles only traffic generated via the sub domains is included and any visits generated via www. are treated as referrals.

The below scenerio is what currently happens and what I am trying to avoid;

User types in serach query
User clicks on www. listing
User visits www.
User then clicks on sub domain link

GA then shows in subdomain profile organic visit. This is incorrect the above scenerio should be treated in GA as such;

www. profile shows organic visit
sub domain profile shows referral visit from www.

IS THIS POSSIBLE!!!!!! so far nobody seems to suggest that it is?

It would appear as though I need to overwrite the cookie from when the user leaves www. to visit sub.domain and vice verser, sharing the cookie information is not correct as want visits between my domains to be see as referrals.

Any advice would be greatly received.
Re: Sub domain tracking Issues - PLEASE HELP!! Whims 8/15/11 10:30 AM
subdomain tracking is when you want to treat the the visitor traffic to the tld and subdomains as if the tld and subdomains are all one entity

have you tried simply putting the same tracking code on the tld and subdomains

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12345-1']);
_gaq.push(['_trackPageview']);

then using filtered profiles to track each hostname

filter name: your choice
filter type: custom 
include
filter field: hostname
filter pattern : ^subdomain1\.domain\.com
case sensitive - no

to track all sites together: 
filter pattern: ^(.*)\.domain\.com


Re: Sub domain tracking Issues - PLEASE HELP!! GA_Newbie21 8/16/11 12:39 AM
Hi Whims,

Thanks for getting back to me, much appreciated.

Did try this but was still seeing the same organic traffic being picked up on www. and sub domain. Will revisit and see if I implemented the filter incorrectly.

Thanks,
Re: Sub domain tracking Issues - PLEASE HELP!! GA_Newbie21 8/16/11 4:42 AM
Hi Whims,

Regarding the all tracking of all sites together if I have the same tag across www. and all the sub domains wouldn't I just be able to get away with a duplication of the master profile without any filters applied?

Testing seems to be ok except a referral between my sub domains and www. is being counted twice, once as referral and once as a direct visit.

Ongoing looking to create master profile without filters, this will include all data.

Will duplicate this profile and apply filters excluding all sub domain traffic, giving me clean organic traffic. When reporting on referring traffic from the sub domains I will look at the master profile which includes everything.

The sub domain profiles will use the same tag as the master profile and I will use the hostname filter.

At the moment the hostname filter is working perfectly for the sub domain tracking just need to try and address the double count for referral data on www.

Thanks,
Re: Sub domain tracking Issues - PLEASE HELP!! GA_Newbie21 8/17/11 4:12 AM
Update,

The sub domain tracking is working perfectly but the main domain is still double counting a referral from the sub domain as a referral and a direct visit plus is including the organic sub domain traffic?

Any ideas on how to reslove?

Thanks,
Re: Sub domain tracking Issues - PLEASE HELP!! Whims 8/17/11 6:44 AM
Hi :-)

always leave one reporting profile without any filters applied to it (golden rule to remember)

to track just the main tld on its own

create a profile for it (add profile for existing domain, same as per adding a profile for a subdomain)

filter name: your choice
filter type: custom 
include
filter field: hostname
filter pattern : domain\.com


Re: Sub domain tracking Issues - PLEASE HELP!! GA_Newbie21 8/17/11 7:03 AM
Thanks Whims, will give it a try!
Re: Sub domain tracking Issues - PLEASE HELP!! expressonline 10/31/11 12:59 AM
Hi Whims,
Much appreciated post, after this https://www.google.com/support/forum/p/Google+Analytics/thread?tid=2030c1d83d5fcf30&hl=en.
But now I am confused, because of this issue (please have a look what I have done till now)
My requirements: I have one tld and two other sub-domains, want to track all three separately.
Done:
1. Created three duplicate profiles and one unfiltered profile (the Golden Rule :D)
2. Applied GA tracking code on three of them (tld, subdomain1 and subdomain2)
 var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-140XXXX-1']);
  _gaq.push(['_setDomainName', '.top-level-domain.com']);
  _gaq.push(['_trackPageview']);
3. Filtered profile 1 and 2 (for sub1 and sub 2) as
filter name: your choice
filter type: custom
include
filter field: hostname
filter pattern : ^subdomain1\.domain\.com
case sensitive - no
Subdomains tracking code working perfectly. :)
4. Filtered profile 3 (for tld) as
Filter Type: Custom filer -> Advanced
Field A -> Extract A: Hostname -> (.*)
Field B -> Extract B: Request URI -> (.*)
Output To -> Constructor: Request URI -> /$A1$B1 <!-- Is '/' required? however, I included this.-->
Field A Required: Yes
Field B Required: No
Override Output Field: Yes
Case Sensitive: No

ISSUE: In the filtered profile 3 -> Top Content Report -> unecessary '/' as prefix, also self referral and organic values
# Major Pageviews are for /www.top-level-domain.com/
# Then, next major pageviews are for /sub1.top-level-domain.com/

Which is quite weired, How to get rid of this. Do I need to apply a filter again

filter name: your choice
filter type: custom
include
filter field: hostname
filter pattern : domain\.com

If yes, then please suggest me where, also the existing filters will be removed. I am confused a lot. Please help!!!
Re: Sub domain tracking Issues - PLEASE HELP!! expressonline 10/31/11 11:37 PM
Hello Everyone,
I got the answer http://www.google.com/support/forum/p/Google+Analytics/thread?tid=034523281719b7c3&hl=en&fid=034523281719b7c30004b0a68f5e3371
1. unecessary '/' -> Resolved
2. Constructor: Request URI -> /$A1$B1 -> Not required
Thanks to every one!!!
Regards