views:

499

answers:

2

I've been tasked with implementing Google Analytics inside our (ASP.NET) application. Here is the scenario:

  1. A single web-site on one domain
  2. Multiple companies all use this single website
  3. Statistics need to be collected on a per company basis as well as the whole
  4. Report access needs to be allocated on a per company basis or for all (Would also be nice if you could assign a range of reports to a specific user)

From the documentation available, I'm not sure whether to use:

Filters (Apply filter on virtual url to segment companies)

<script type="text/javascript">
   var pageTracker = _gat._getTracker("UA-12345-1");
   pageTracker._initData();
   pageTracker._trackPageview("/site.com/companyName/var1/var2");
</script>

Or Segments

<script type="text/javascript">
    var pageTracker = _gat._getTracker("UA-12345-1");
    pageTracker._initData();  
    pageTracker._trackPageview();
    pageTracker._setVar("companyName");
    pageTracker._setVar("var1");
    pageTracker._setVar("var2");
</script>
+1  A: 

Virtual addresses work fine with Google Analytics. You will see the content page there giving you a list like

/companyA/welcome.aspx
/companyA/aboutus.aspx
/companyC/orderstatus.aspx
/companyB/welcome.aspx
/companyA/confirmorder.aspx
/companyC/welcome.aspx

You can then filter the list by company name, and it will just show "welcome" or "companyA" It will also show you the graph for content matching the query.

The columns there will show; Page, Pageviews, Unique Pageviews, Avg. Time on Page, Bounce Rate, % Exit, $ Index.

Hope this helps.

Dead account
A: 

Both the ideas you posted have a similar flaw. They don't segregate access. In order to segregate access to each company's reports, you would have to create a separate code for each company. As such, you may have UA-12345-1, UA-12345-1, and UA-12345-1. The ASP.NET would be responsible for putting the right code in. This way, you can grant access to users for specific companies.

The only problem with this is the lack of a unified report across all companies. I don't know that Analytics can do both the segregation and the unified reporting. Good luck!

Jack M.