2

I need some help trying to setup google analytics correct. Here is my setup:

We host sites for multiple customers, and each customer have their own subdomain on our site. So we have customerA.oursite.com and customerB.oursite.com

As we add more customers we get more subdomains. We do want to track all data for each customer independent, but I don't want to to create a new google tracking code for each new customer.

So my plan is to track all visits with "oursite.com", and then I will create a filter in google Analytics to get data for each specific customer(All visits for a specific subdomain). Is this(One tracking code, and a subdomain filter) the right way to do it?

To create a subdomain filter i add a new profile for each customer, and then add a custom filter saying include "Request URI" and fill in "CustomerDomain.oursite.com". Is this the correct way to do it?

And a general question about filters: Is it really impossible to create a new filter by applying it to data in an existing profile? I would really like to just collect all the data in one "main" profile and then create subdomain filters as we need them. But it seems that google only apply filters to new incomming data, not existing data. Is this really true?

The following is my tracking code. Is '_setDomainName','none' the right thing to do?

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-12345678-10']);
  _gaq.push(['_setDomainName', 'none']);
  _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);
  })();
</script>
MTilsted
  • 123
  • 5

1 Answers1

0
  _gaq.push(['_setDomainName', 'none']);

is fine for this scenario, while

  _gaq.push(['_setDomainName', 'customerA.oursite.com']);

would the best.

True, filters can't be applied after data has been collected, they apply only to the incoming audience data. The workaround you can use is to define an advanced segment on 'hostname' matching exactly the name of each customer. But there is a limit on the number of AS you can create for a login : 100 advanced segments.

And you will need to export somehow (from the GA API for example) the audience data to share it with each customer: there isn't any access rule per Advanced Segment, it exists only per profile.

In fact, I would recommend that you allow each customer to set its own UA number, that they handle creation of the account, access settings, goald definitions and so on. You would fit way many different situations without the hasle of specific cases.

Last, I wouldn't be suprised that your customers ask to have own domain name...

Does this answer your question ?

Open SEO
  • 146
  • 3
  • It does answer my question, but it also confirms that we can't use google analytics for our website software -( – MTilsted May 21 '11 at 04:20