The Web Analytics Tracking Module for IIS 7.0 is a managed module that simplifies the task of adding web analytics tracking code to the page of any kind of web site hosted on IIS 7.0. Instead of making changes to all web pages of the web site, one can just configure the Web Analytics Tracking module to insert tracking script to every html page that is served by IIS.
To start using the module, first compile it from this Visual Studio solution. You can use VS 2005, VS2008 or Visual C# Express 2005 and 2008 to compile the solution. You may also use the precompiled versions in the bin\release folder.
To install the module follow these steps:
1. Copy the WebAnalyticsModule.dll to a bin folder within your web site or
application
2. Copy the WebAnalytics_schema.xml to "%windir%\system32\inetsrv\config\schema"
folder.
3. Add the following to the "%windir%\system32\inetsrv\config\applicationhost.config"
file:
In the sectionGroup for "system.webServer", add the section definition: <section name="webAnalytics" overrideModeDefault="Allow">
4. Add module to a web site or an application by opening corresponding web.config file and adding the following section to the <system.webServer> element:
<modules>
<add name="WebAnalytics" type="WebAnalyticsModule.WebAnalyticsHttpModule" />
</modules>
5. Next, use the gacutil tool to put the module to the Global Assembly Cache so that IIS Manager can use them:
gacutil -if WebAnalyticsModule.dll
6. Add the module to the IIS Manager configuration in the "%windir%\system32\inetsrv\config\administration.config" file:
In the <moduleProviders> collection, add the following entry:
<add name="WebAnalytics" type="WebAnalyticsModule.WebAnalyticsProvider,
WebAnalyticsModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c6b7132bcfe43312"
/>
And add the following line to the <modules> collection:
<add name="WebAnalytics" />
7. Open the IIS Manager. You should see the "Web Analytics Tracking" icon in the feature view for your web site or application.