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>