I’ve been tasked with implementing Google Analytics inside our (ASP.NET) application. Here is the scenario:
- A single web-site on one domain
- Multiple companies all use this single website
- Statistics need to be collected on a per company basis as well as the whole
- 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>
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.